Guys
Under “Entry and Exit Signals”, my MOC code is as follows:
LESetUp = C1 AND C3 AND C4;
BuyLimP = L – ATRVal;
Tick = 0.01;
BuyLimVal = round(BuyLimP/Tick);
BuyLimit = BuyLimVal * Tick;
//
OnLastTwoBarsOfDelistedSecurity = BarIndex() >= (LastValue(BarIndex()) -1) AND !IsNull(GetFnData(“DelistingDate”));
//Used for the entry
LE = Ref(LESetUp,-1) AND NOT OnLastTwoBarsOfDelistedSecurity;//Long Entry the day before trigger bar
LEPrice = Min(Ref(BuyLimit,-1),Open);
//
_SECTION_END();
Do we even need:
OnLastTwoBarsOfDelistedSecurity = BarIndex() >= (LastValue(BarIndex()) -1) AND !IsNull(GetFnData(“DelistingDate”));
or this bit of code in the LE section:
AND NOT OnLastTwoBarsOfDelistedSecurity;