Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

order Handling based on error type

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    order Handling based on error type

    Hello. I need to be able to handle various orders. error such as this one.
    "submitted an order that generated the following error 'Unable to change order'"
    I notice a lot of times with NQ the system gets order errors. I don't mind being unable to change the order since I have a stop in place. However, I don't want termination I would prefer to take the loss and ignore the error if it's that one above. or Stop cannot be placed above or below market. Those I can ignore.

    Can you point me to how I can ignore some errors and leave my strategy running?



    #2
    Hello richa61416,

    Thanks for your post.

    You could use RealtimeErrorHandling to determine the behavior of a strategy when the strategy places an order that results in an error.

    RealtimeErrorHandling could be set to IgnoreAllErrors to ignore any order errors received. Please note that setting this property value to IgnoreAllErrors can have serious adverse affects on a running strategy unless you have programmed your own order rejection handling in the OnOrderUpdate() method. To do this you could trap the order within OnOrderUpdate() followed by defining your own order error handling behavior for the order.

    Please see the example in the help guide link below that demonstrates using RealtimeErrorHandling and trapping an order in OnOrderUpdate().

    RealtimeErrorHandling — https://ninjatrader.com/es/support/h...orhandling.htm

    And, see this help guide for information about OnOrderUpdate and the available error codes: https://ninjatrader.com/support/help...rderupdate.htm

    Let me know if I may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X