The following is the code that has the error.
if (LongEntryA != null
&& LongEntryB != null
&& Close[0] < SMA(sMAPeriod)[0]
|| Close[0] < Ichimoku(9,26,52).KijunSen[0])
{
CancelOrder(LongEntryA);
CancelOrder(LongEntryB);
}
at System.Object.GetType()
at NinjaTrader.Strategy.StrategyBase.CancelOrder(IOrd er iOrder)
at NinjaTrader.Strategy.TrendPilot.OnBarUpdate()
Can someone help me with what is probably wrong with this? I am not sure if you have enough information to be able to determine it. The goal of this logic is to cancel any open orders if the candle closes below the KijunSen line and/or the SMA.
Thanks for your help.

Comment