Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Handled Exceptions Reference for Orders Objects

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

    Handled Exceptions Reference for Orders Objects

    Apologies if this is addressed elsewhere on the forum or otherwise readily accessible, but I was trying to find a master reference for all handled exceptions pertaining to order submission/rejection such that I can continue to expand my own handling routines.

    Is there a central place where I can review all possible exceptions that may be thrown?

    By default I have RealtimeErrorHandling set to StopCancelCloseIgnoreRejects when running my Strategies and I also make use of AtmStrategyCreate(), which I know introduces its own layer of complexity due to asynchronicity, etc.

    I've dug pretty extensively through the HelpGuide as well as here on the forum so I figured I'd just go ahead and ask direclty.

    Thank you.

    #2
    Hello TheFil,

    For orders you can see the states that are possible here: https://ninjatrader.com/support/help...lightsub=order

    Rejections there is not a specific list of possible rejections because there are many actions that you could potentially do which could conflict with a given broker. There are varied rejections depending on each broker.

    The rejection override contains a few parameters that you can use which are ErrorCode error, string nativeError.

    The best way forward would be to run the script with rejection handling on so that it gets disabled for rejects. Collect any rejections you receive so you can program logic for those situations. Its best to avoid turning off rejection handing until you have some expectations of what rejects may happen. With this off that may allow the script to continue placing problematic trades or even enter into problematic positions when there is not any logic to catch those rejects.


    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks NinjaTrader_Jesse

      That's a helpful start. Don't know how I missed that pass through the HelpGuide.

      Follow-up question: In general, what kinds of errors correspond with ErrorCode.Panic?

      I've thrown this before, but I don't recall the context...

      Comment


        #4
        Hello TheFil,

        I am not aware of anything that documents that, panic is reported for various errors. That is more of a general error code than anything specific as it comes for multiple reasons.

        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Waxavi, Today, 02:10 AM
        0 responses
        3 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        8 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by elirion, Today, 01:36 AM
        0 responses
        4 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by gentlebenthebear, Today, 01:30 AM
        0 responses
        4 views
        0 likes
        Last Post gentlebenthebear  
        Working...
        X