Some trades are not happening, I must be missing something.
Here are the formulas I am using, if someone can help please:
Long Entry
LE:= ref(MACD(),1)>0;
LX:= MACD()<0;
SE:= MACD()<0;
SX:= ref(MACD(),1)>0;
B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX);
B = 1 AND Ref(B,-1) <> 1
Strategic Delay 1
==================================
Long Exit
LE:= ref(MACD(),1)>0;
LX:= MACD()<0;
SE:= MACD()<0;
SX:= ref(MACD(),1)>0;
B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX);
B = 0 AND Ref(B,-1) = 1
==================================
Short Entry
LE:= ref(MACD(),1)>0;
LX:= MACD()<0;
SE:= MACD()<0;
SX:= ref(MACD(),1)>0;
B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX);
B = -1 AND Ref(B,-1) <> -1
==================================
Short Exit
LE:= ref(MACD(),1)>0;
LX:= MACD()<0;
SE:= MACD()<0;
SX:= ref(MACD(),1)>0;
B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX);
B = 0 AND Ref(B,-1) = -1
Strategic Delay 1
==================================
Best regards,
Bulli