Hello, I have obtained this error in a strategy: "Buy order stop price must be above last trade price ExchangeRejectCode = 2061 affected. Order: BuyToCover: 1 [email protected]" It has occurred because prices have moved very quickly. How can I avoid this situation? How can I prevent the strategy from being deactivated, even if an error like this occurs? Thanks in advance and regards.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ExchangeRejectCode
Collapse
X
-
ExchangeRejectCode
Hello, I have obtained this error in a strategy: "Buy order stop price must be above last trade price ExchangeRejectCode = 2061 affected. Order: BuyToCover: 1 [email protected]" It has occurred because prices have moved very quickly. How can I avoid this situation? How can I prevent the strategy from being deactivated, even if an error like this occurs? Thanks in advance and regards.Tags: None
-
Hello soyjesus,
Thanks for your post.
Situations like this can occur when the stop price is being submitted to close to the market when there is higher volatility. The stop price can be moved further away from the current market price, or the strategy can be modified so it does not disable on rejections.
To prevent the strategy from being deactivated, you can set the strategy's RealtimeErrorHandling property to IgnoreAllErrors or StopCancelCloseIgnoreRejects. With this property set, you can then trap order rejections in OnOrderUpdate if you would like to have the strategy attempt a different action.
RealtimeErrorHandling - https://ninjatrader.com/support/help...orhandling.htm
OnOrderUpdate() - https://ninjatrader.com/support/help...rderupdate.htm
Please let me know if I can be of further assistance.
- Likes 1
-
Hello soyjesus,
Thanks for your message.
Have you added the advised code for RealtimeErrorHandling so the strategy does not disable upon rejections?
What is the error you are receiving which results in the strategy disabling? Please include a screenshot or copy the error from the Log tab of the Control Center by selecting it and pressing Ctrl + C.
I look forward to assisting.
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
62 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
134 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 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
50 views
0 likes
|
Last Post
|

Comment