Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy returns error when running live and cancels itself
Collapse
X
-
I am also having the same issue.
I'm running primary strategy on MNQ, trading NQ.
It works just fine in market replay... but getting these errors:
Strategy 'aaaHalgo_October24/329546214' submitted an order that generated the following error 'Order rejected'. Strategy has sent cancel requests, attempted to close the position and terminated itself.
Disabling NinjaScript strategy 'aaaHalgo_October24/329546214'
-
I am getting this error (trying to forward test the strategy...) but this is during live market hours (8:04PM Eastern on Sunday evening)
Comment
-
-
Hello samish18,
'The current price is outside the price limits set for this product', typically means the price of the order is too far from the trading action.
In the script, print GetCurrentAsk() one line above printing the order.ToString() in OnOrderUpdate() (and temporarily use the RealtimeErrorHandling.IgnoreAllErrors while debugging).
This should show us what the ask is at the moment the stop order is submitted and what the order price was.
Below is a link to a support article on adding debugging prints to understand behavior.
Save the output to a text file (right-click the output window, select Save as) and attach this to your next post.Chelsea B.NinjaTrader Customer Service
Comment
-
Hi Chelsea, if it is indeed the case that price is changing too fast what can we do? Do we have to change the limit to a market order instead to ensure that it fills? I find that I get this error more when I do update on price change other than on each tick
Comment
-
Hello ruudawakening,
If that was the issue, you would need to choose a stop price that is closer to the trading action. Or you could choose to submit a market order that fills immediately.
However, we'll know more about what is causing the issue once you have provided the requested output.Chelsea B.NinjaTrader Customer Service
Comment
-
How do I get it to print orders to string using the strategy builder? I selected trade orders in default properties and it’s still not printing and there is no order management under the print function in strategy builder?
Comment
-
Hello ruudawakening,
The 'Debugging with the Strategy Builder' video linked from the 'Debugging using Print() and TraceOrders' article suggested in post # 5 demonstrates adding prints with the Strategy Builder.
However, the OnOrderUpdate() override cannot be implemented in the Strategy Builder. This gives information about the order price, state, and time which is necessary information for this issue and would require unlocking the script and coding by hand.
Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
56 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
132 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
73 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment