Jose -- Probably because you helped with the original -- but slightly different -- problem, last year... http://forum.equis.com/forums/thread/20340.aspx
Right now, it will miss the 1st signal if it is a SELL. I'd like it to work, no matter whether a SELL or BUY comes first.
|
|
Buy:=Cross(RSI(14),30); Sell:=Cross(70,RSI(14)); init:=Cum(IsDefined(Buy+Sell))=1; {init:=Cum(buy+sell>-1)=1;} flag:=ValueWhen(1,Buy-Sell<>0 OR init,Buy)*2-1; flag*(flag<>Ref(flag,-1));
|
Not sure I correctly know how a variable behaves when it is not defined...any help on understanding would be appreciated.
--Johnathan