I have an issue when changing the stop order price. It throws an error saying it can’t be changed because the quantity can’t be less than one? It’s important to note that this code below hasn’t changed in months and it was working fine until recently… now this error started popping up just around the same time the latest NT version was released. I suspect something has changed in the NT backend that is causing it.
Here is the code I am using…
Order order = orders[LONG]; // get order from map
order.StopPriceChanged = Instrument.MasterInstrument.RoundToTickSize(price);
Account.Change(new[] { order });
In case the NT developers see this it’s important to note that this issue is random. The first few stop price changes seem to go through ok on a fresh startup of the NT platform but then the issue starts appearing on every stop price change. Restarting the NT platform seems to get it working again but then the issue starts to repeat itself.
As mentioned above the backend is skipping the ChangeSubmitted state and going straight to the Accepted state which then results in the NT platform throwing the popup error message.
Usually when the strategy changed an order the flow used to be…
OnOrderUpdate event called:
ChangePending
ChangeSubmitted
Accepted
But when the error happens I am seeing only…
OnOrderUpdate event called:
ChangePending
Accepted
Then the error message appears.
Note that the code in the strategy we are using has not changed for months and worked fine until the latest NT release… rolling back to the previous NT platform release does not solve the issue so this must be an issue in the NT platform backend code (not the NT platform and not with our strategy).
Welcome to our new community support forums! This forum is community-driven and no longer staffed by official support. For official support, please visit support.ninjatrader.com.