Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

If an order is rejected, does it need to be canceled?

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

    If an order is rejected, does it need to be canceled?

    Hello,
    I am working on a strategy and need a bit of clarification.
    In a strategy, inside onOrderUpdate(), if the IOrder.OrderState = OrderState .Rejected, does the order need to be canceled? The example code on the Forum does not directly address this condition.

    This came up as an issue, because I am invoking RealtimeErrorHandling.TakeNoAction and must take care of all cases. When an order rejection is detected, I need to exit my position, and cancel all orders. The question I now have is: Do I need to cancel the order that was rejected?

    I would really appreciate a clarification on this.

    Thanks for your help,

    Bormir

    #2
    Hi Bormir, a rejected order is in a terminal state and would normally stop the strategy, so there's no need to cancel it with your setup.

    Comment


      #3
      Hi Bertrand,
      In my original posting, I indicated that I was invoking RealtimeErrorHandling.TakeNoAction, so that the strategy does NOT stop, or terminate. This is the source of my question!

      When I am in the RealtimeErrorHandling.TakeNoAction mode, do I need to cancel an order if it was rejected?

      Does this make sense?

      Thanks for your help,

      Bormir

      Comment


        #4
        No need to cancel the order, rejected is a terminal state, in your case the strategy will continue to run then.

        Comment


          #5
          Thanks!

          Thanks for the clarification Bertrand!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by SalmaTrader, 07-07-2026, 10:26 PM
          0 responses
          47 views
          0 likes
          Last Post SalmaTrader  
          Started by CarlTrading, 07-05-2026, 01:16 PM
          0 responses
          22 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 06-17-2026, 10:32 AM
          0 responses
          15 views
          0 likes
          Last Post CaptainJack  
          Started by kinfxhk, 06-17-2026, 04:15 AM
          0 responses
          21 views
          0 likes
          Last Post kinfxhk
          by kinfxhk
           
          Started by kinfxhk, 06-17-2026, 04:06 AM
          0 responses
          23 views
          0 likes
          Last Post kinfxhk
          by kinfxhk
           
          Working...
          X