Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancel order and send new one in the same bar

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

    Cancel order and send new one in the same bar

    Hello,

    I have a strategy that needs cancel an order and send a new one in the same bar. But when my strategy cancel an order it only sends a new order, two bars after this cancellation.

    I have tried changing the value of the "Entries per direction" but the problem continues.

    How can I solve it?

    Thanks in advance and the best regards.

    #2
    Hi soyjesus, where are the orders send then? Do you wait for the cancel confirm in OnOrderUpdate and then issue the new order?

    Comment


      #3
      Hi Bertrand,

      I send both orders from OnBarUpdate(). Must I do it from OnOderUpdate?

      The situation is like this: I have a Buy Order and when the bar is finished, this order has not filled; so I must update the entry price. So, the the first order is cancelled and I need to send a new one with a different entry price inmediately (in the same bar).

      Comment


        #4
        soyjesus, I would definitely send the new order then once the cancel state is seen in OnOrderUpdate for your original IOrder.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        87 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        131 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        106 views
        0 likes
        Last Post CarlTrading  
        Working...
        X