NinjaTrader Development Blog



Quite often, if you do not serialize your Brush parameters in your NinjaTrader strategy or indicator you will be fine but only until you try saving your presets. When a preset is saved all parameters are actually serialized into a string on the backend and if you have not handled the Brush parameter properly in your code then you will get a problem, you won't be able to save parameters and NinjaTrader might also crash. Below is how to properly handle this situation:

This is a painful spot for NinjaTrader and I have already written quite a few blog posts on this but just recently I came across a quick walking stick that I would like to share.

Basically to outline a problem imagine two bars. You get filled on one bar lets say at 15:00, next bar is 15:05 and previous bar is 14:55. So you get filled whilst the 14:55 - 15:00 bar is forming, so a bar with 15:00 close time.


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.”

I bet you have received this frustrating message a few times whilst using 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.” Carry on and read more to find out more!