Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Expiration of Entry() and Exit() orders when CalculateOnBarClose == false

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

    Expiration of Entry() and Exit() orders when CalculateOnBarClose == false

    Hi,

    When updating a strategy every tick, (CalculateOnBarClose == false), are Entry() and Exit() orders automatically cancelled after each tick (if LiveUntilCancelled != true), or only at the end of the bar?

    If I wish to change my orders every tick and I only want to have at most one working order at a time and LiveUntilCancelled != true, must I first explicitly track and cancel prior orders or can I assume they have been cancelled?

    My confusion stems from the following. On the one hand it seems that existing orders are cancelled on each call to OnBarUpdate() (whether every tick, or every bar):

    By default, orders are kept alive provided that they are re-submitted on each call of the OnBarUpdate() method. If the order is not re-submitted, the order is then cancelled.
    On the other hand, I believe I've read (although I can't cite the source now) that orders placed in OnBarUpdate, if LiveUntilCancelled != true, are cancelled at the end of the bar.
    Last edited by kaydgee; 09-16-2010, 04:54 AM. Reason: cited information from on-line help

    #2
    Kay, they still expire at the end of the bar they were placed on then - you can also just Add() a one tick series for example > this would prompt order to get cancelled on next tick then.

    Comment


      #3
      Bertrand,

      How are partial fills handled? Is the original order kept alive or is it also cancelled after the bar? If so, how do I fill the balance of the position, especially if EntriesPerDirection == 1? How do I change the limit price for the balance of the fill?

      Ken

      Comment


        #4
        PartFilled for this scenario is still 'working' state as it's not fully filled, hence the order would expire, too...so it could leave you not fully filled in this case. You would need to monitor via the IOrder (Filled property vs desired size) and then send another order to rectify missing qty.

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          PartFilled for this scenario is still 'working' state as it's not fully filled, hence the order would expire, too...so it could leave you not fully filled in this case. You would need to monitor via the IOrder (Filled property vs desired size) and then send another order to rectify missing qty.
          Can I assume that if OrderState != OrderState.Filled that the partial fill DOESN'T count against EntriesPerDirection?

          Meaning if I set EntriesPerDirection = 1 and try to buy 10 contracts at Price Limit A and only get filled on 7 of them, I can then cancel the order and issue a new Enter() order or modify the price to Price B and quantity to 3 on the existing order and not violate EntriesPerDirection?

          Comment


            #6
            No, the PartFilled position will count as MarketPosition, hence if this is working to get fully filled another order is ignored with EntriesPerDirection to 1.

            Comment


              #7
              How, then, do I resolve the following?

              Let's say the Last price is 100.2. I issue an EntryLongLimit(100.1) for 10 contracts and get filled on 7 of them. Now the Last price ticks up to 100.4 and I want to try to fill the remaining 3 contracts at 100.3. I have EntriesPerDirection = 1, I have a PartFilled order and LiveUntilCancelled != true. How do I try to fill the order at the new limit price?

              Comment


                #8
                Either go into unmanaged mode (for NT7) as there's no related signal tracking done, or just submit the order with a different entry name and set your EntryHandling to unique entries - http://www.ninjatrader-support.com/H...yHandling.html

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                648 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                369 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                108 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                572 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                574 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X