Wouldn't the "INIT OR xxx" take care of that?
|
|
Buy:=Cross(RSI(14),30); Sell:=Cross(70,RSI(14)); init:=Cum(IsDefined(Buy+Sell))=1; short:=BarsSince(init OR sell)<BarsSince(init OR buy); long:=BarsSince(init OR buy)<BarsSince(init OR sell); flag:=long-short; flag*(flag<>Ref(flag,-1));
|
As "-1" and "+1" are used for signals, the undefined state would be "0", if I understand things correctly. Is that what you mean by "null" bars?
Since you mentioned it -- just what does your "Xtend.dll" do?
--Johnathan