Hi there, this is a continuation of issue SetTrailStop vs. SetStopLoss? - NinjaTrader Support Forum
As you can see, I'm getting the error where both the upper and lower stop limits can not be set, indicating the market moved too far in-between the execution of both statements. However, I'm using a 100 tick profit/stop loss. Of course, I'm skeptical the market moved a hundred points in-between the microseconds the profit and stop loss targets were set. I'm using the sample SMA strategy.
Your thoughts? Thanks,
SetProfitTarget("MyLongTrade", CalculationMode.Ticks, 100, false);
SetTrailStop("MyLongTrade", CalculationMode.Ticks, 100, false);
SetProfitTarget("MyShortTrade", CalculationMode.Ticks, 100, false);
SetTrailStop("MyShortTrade", CalculationMode.Ticks, 100, false);
.....
if (CrossAbove(smaFast, smaSlow, 1))
EnterLong("MyLongTrade");
else if (CrossBelow(smaFast, smaSlow, 1))
EnterShort("MyShortTrade");

Comment