Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

order is Canceled only in bar close

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

    order is Canceled only in bar close

    Hello,

    I am running a strategy with the following setup:
    CalculateOnBarClose = false
    manage approach order
    liveUntilCancelled = false

    By default, orders are kept alive provided that they are resubmitted
    on each call of the OnBarUpdate() method. I
    f the order is not re-submitted, the order is then cancelled.

    The problem is if I have submitted an order (stop limit order) and the order state is pending
    and I do not resubmit the order again in the next OnBarUpdate() the order is not cancelled immediately, it is cancelled only when bar closed.

    Sincerely,Kobi

    #2
    Thanks for the post Kobi.

    So you mean for the case where the order not got into working yet but only PendingSubmit and then you see an OnBarUpdate() call?

    Comment


      #3
      Hello Bertrand,

      yes, the order is not in working state and even though I don't resubmit the order , the order is not cancelled only in bar close.

      by the way in this case ,is the order should be cancelled even if the order is working?

      Sincerely,Kobi

      Comment


        #4
        I would expect that for a single series strategy Kobi, the order expiration would be at bar close. The stop would usually only get to accpeted state, whereas then triggered the limit order would be working.

        Comment


          #5
          Hello Bertrand,

          Sorry, but I didn't understand your answer , could you please explain it.

          I expect that if I don't keeping resubmit the order on each call to OBU , the order will expired and cancelled immediately and not on bar close.

          This is according the help guide and I quote from the help guide
          "By default, orders are kept alive provided that they are resubmitted
          on each call of the OnBarUpdate() method. If the order is not re-submitted, the order is then cancelled."

          from this I understand that NT is handling this and the order should be cancelled immediately (even before bar close) .

          please explain it to me


          Sincerely,kobi

          Comment


            #6
            Hi Kobi, no it would be the closed bar update that would count here in this case, the order will be held for the bar it was submitted for. If you add for example a one tick series in, you should see the cancel on the next tick as this would be the next OnBarUpdate() then calling for a closed bar.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            633 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            364 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            567 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            568 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X