Your script will only have the stop loss fill and the exit order will be ignored, as you cannot use set methods and exit orders on the same order.
This violates the internal order handling rules for the managed position.
https://ninjatrader.com/support/help...antedPositions
"Methods that generate orders to exit a position will be ignored if:
•A position is open and an order submitted by an enter method (EnterLongLimit() for example) is active and the order is used to open a position in the opposite direction
•A position is open and an order submitted by a set method (SetStopLoss() for example) is active"
Enable the TraceOrders and you will get a message that the order was ignored, which would tell you what happened with the order.
Please enable TraceOrders in State.Configure, then please provide the output from the output window.
Are you testing just the stop loss and this is not filling when the price falls 7 ticks below the entry?
Comment