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 Mindset, 05-06-2023, 09:03 PM
        10 responses
        262 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by michi08, 10-05-2018, 09:31 AM
        5 responses
        741 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by The_Sec, Today, 02:29 PM
        0 responses
        2 views
        0 likes
        Last Post The_Sec
        by The_Sec
         
        Started by tsantospinto, 04-12-2024, 07:04 PM
        4 responses
        62 views
        0 likes
        Last Post aligator  
        Started by sightcareclickhere, Today, 01:55 PM
        0 responses
        1 view
        0 likes
        Last Post sightcareclickhere  
        Working...
        X