In my strategy, there are 5 ways that a long trade can be exited. Three of them have their own IOrder order variables
- IOrder LongBStop
- IOrder LongAdjustedStop
- IOrder TrailingStopLong
The other two ways are
- Close below SMA
- Close below Custom Indicator
For the last two, I simply use this code:
if (LongEntryA != null
&& LongEntryB != null
&& (Close[0] < SMA(sMAPeriod)[0]
|| Close[0] < CustomIndicator[xyz]))
{
ExitLong("LongEntryA");
ExitLong("LongEntryB");
}
Could you please let me know how to check for that in order to reset to null?
Thank you very much for your help!

Comment