Ciao,
Why won't this work? OK, I'm developing a system where I need to track system states to keep indicators from cluttering my chart. These "latches" will not work for me so I put together this proof of concept piece to try to debug, pretty much stright out of the manual. This system will display one enter signal, then one short enters, then ,,,, nothing! Can someone who knows this function tell me what's wrong with my code?
Enter Long
fastMA:=Mov(C,7,S);
slowMA:=Mov(C,21,S);
stochInd:=Stoch(5,3);
LE:=Cross( fastMA, slowMA )
OR
Cross(stochInd,20);
SE:=0;
LX:=0;
SX:=0;
B:= ExtFml("forum.Latch",LE,LX,SE,SX);
B = 1 AND Ref(B,-1) <> 1
Enter Short
fastMA:=Mov(C,7,S);
slowMA:=Mov(C,21,S);
stochInd:=Stoch(5,3);
SE:=Cross( slowMA, fastMA )
OR
Cross(80, stochInd );
LE:=0;
LX:=0;
SX:=0;
B:= ExtFml("forum.Latch",LE,LX,SE,SX);
B = -1 AND Ref(B,-1) <> -1
Exit Long
stochInd:=Stoch(5,3);
LX:=Cross(90,stochInd);
LE:=0;
SE:=0;
SX:=0;
B:= ExtFml("forum.Latch",LE,LX,SE,SX);
B = 0 AND Ref(B,-1) = 1
Exit Short
stochInd:=Stoch(5,3);
SX:=Cross(stochInd,10);
LE:=0;
LX:=0;
SE:=0;
B:= ExtFml("forum.Latch",LE,LX,SE,SX);
B = 0 AND Ref(B,-1) = -1
I appreciate the aid,
Garp
woof woof