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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        556 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X