Ninjatrader 8 expert needed for a quick project

Job ID: 37797495

Budget: $2 – $8 USD

What I suspect is happening is the following order is being submitted as an exit order when the short entry is executed:
SetStopLoss("Enter Short", CalculationMode.Price, MiEMA[1], false);

The problem is likely that the value MiEMA[1] is lower than the market price, so the stop loss is being submitted to an invalid price and resulting in errors. You either need to modify the price used in SetStopLoss() or you need to remove this from your script and utilize your logic for ExitShortStopMarket():
slOrderShort = ExitShortStopMarket(0, true, quantity, stopLevel, "Stop Short", "Enter Short");

You can't use both types of exits for the same position.


I will share the file over chat. Thank you