Hello guys! More code snippets here! So, NinjaTrader offers a default function for you to set your stop size which is:
SetStopLoss(CalculationMode.Currency, 200);
Easy done! Just put this into the OnState.Configure and you are pretty much done and for many cases, this can be enough, however, for most of the cases that require a careful and more controlled approach to stop handling this is not enough at all.
NinjaTrader uses the managed order handling mode by default and you can run into a few scenarios when you wrote all of your code and suddenly your orders start getting ignored although it seems that everything you wrote is very logical.
Hello everyone! If you have not read the first part of this article yet it might be a good idea. Nevertheless, this time we will be looking at the case of why you can get this error on live market or during market replay in NInjaTrader.
“Sell stop or sell stop limit orders can’t be placed above the market. Strategy submitted an order that generated the following error - order rejected. Strategy has sent cancel requests, attempted to close the position and terminated itself.”
“Sell stop or sell stop limit orders can’t be placed above the market. Strategy submitted an order that generated the following error - order rejected. Strategy has sent cancel requests, attempted to close the position and terminated itself.” Carry on and read more to find out more!