Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order Cancellation "race condition" Message

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

    Order Cancellation "race condition" Message

    Hi,

    I use UnManaged orders, and there is always the possibility of a race condition such as this one.

    Click image for larger version

Name:	Cancel-rejected-order-filled.PNG
Views:	160
Size:	5.4 KB
ID:	1156872

    Is there any way for me to catch this exception condition, so that I can ignore the
    cancellation request, and suppress this message; plus stop the subsequent termination
    of my Strategy instance?

    Thanks for any ideas !
    hyper


    #2
    Hello Hyper,

    Thank you for your post.

    What is your current setting in the strategy code for RealTimeErrorHandling? I suspect you currently have it as the default of StopCancelClose, is that correct?

    To prevent the strategy from being deactivated when an order error occurs, you can set the strategy's RealtimeErrorHandling property to IgnoreAllErrors. StopCancelCloseIgnoreRejects will keep the strategy running for rejections but not for other order errors like a failure to change an order. With this property set, you can then trap order errors in OnOrderUpdate if you would like to have the strategy attempt a different action.

    Please note that this is reserved for advanced users that want to implement their own order error handling. Neglecting to handle an order error when having RealtimeErrorHandling set to IgnoreAllErrors or StopCancelCloseIgnoreRejects can result in damages to your account. ALWAYS monitor your automated trading strategies.

    RealtimeErrorHandling - https://ninjatrader.com/support/help...orhandling.htm

    OnOrderUpdate() - https://ninjatrader.com/support/help...rderupdate.htm

    We look forward to assisting further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      THANK YOU SO MUCH. I'll implement those changes.
      NinjaTrader is such great engineering !

      hyperscalper

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by DanielTynera, Today, 01:14 AM
      0 responses
      2 views
      0 likes
      Last Post DanielTynera  
      Started by yertle, 04-18-2024, 08:38 AM
      9 responses
      40 views
      0 likes
      Last Post yertle
      by yertle
       
      Started by techgetgame, Yesterday, 11:42 PM
      0 responses
      9 views
      0 likes
      Last Post techgetgame  
      Started by sephichapdson, Yesterday, 11:36 PM
      0 responses
      2 views
      0 likes
      Last Post sephichapdson  
      Started by bortz, 11-06-2023, 08:04 AM
      47 responses
      1,615 views
      0 likes
      Last Post aligator  
      Working...
      X