Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

order cancelled

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

    order cancelled

    Hello

    In my strategy I have two bar objects (13 m and 3 m). On bar updates I have a filter if BarsInProgress==1 then return (leave). Later I place and order EnterLongLimit(0,false,...)

    This order does not get executed because it gets cancelled by the order with BarsInProgress==1. How is it possible?

    Thank you.

    #2
    Sergey, this is default behavior in NT, if you don't resubmit the order or use liveUntilCancelled the next bar update incoming would cancel the working order.

    Comment


      #3
      but the order is called from BarsInProgress=0 and cancelled from the BarsInprogress=1, why are they overlapping?

      Comment


        #4
        Those would not be treated separately, they expire per default at the next OnBarUpdate() even if another BIP is triggering it.

        Comment


          #5
          the the real problem for me is that the order is cancelled before it gets executed, price is clearly below enter limit price before order is placed but execution fails because other gets cancelled first, I have updates on each incoming tick turned on.

          Comment


            #6
            Please run with TraceOrders enabled in your strategy and then post the relevant debug info from the output window here - http://www.ninjatrader.com/support/f...ead.php?t=3627

            Comment


              #7
              This is the output (ignore true false statements they are for my own debugging), also I do not have permission to use the thread that you recommended, I get these messages on each tick:

              19/01/2011 12:54:54 Entered internal PlaceOrder() method at 19/01/2011 12:54:54: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=0,1M LimitPrice=1,3464 StopPrice=0 SignalName='long_1019' FromEntrySignal=''
              19/01/2011 12:54:54 Ignored PlaceOrder() method: Action=Buy OrderType=Limit Quantity=100000 LimitPrice=1,3464 StopPrice=0 SignalName=long_1019' FromEntrySignal='' Reason='There already is a matching order with same prices and quantity'
              19/01/2011 12:54:54 Cancelled expired order: BarsInProgress=1: Order='8c4914b519504bbda4dbfb100f1ff522/Sim101' Name='long_1019' State=PendingSubmit Instrument='$EURUSD' Action=Buy Limit price=1,3464 Stop price=0 Quantity=0,1M Strategy='Pips3' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='8c4914b519504bbda4dbfb100f1ff522' Gtd='01/12/2099 00:00:00'
              True False 1019 0
              True False
              19/01/2011 12:54:54 Entered internal PlaceOrder() method at 19/01/2011 12:54:54: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=0,1M LimitPrice=1,3464 StopPrice=0 SignalName='long_1019' FromEntrySignal=''
              19/01/2011 12:54:54 Cancelled expired order: BarsInProgress=1: Order='8b6afd4974cd468088be3f9f058d84f6/Sim101' Name='long_1019' State=PendingSubmit Instrument='$EURUSD' Action=Buy Limit price=1,3464 Stop price=0 Quantity=0,1M Strategy='Pips3' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='8b6afd4974cd468088be3f9f058d84f6' Gtd='01/12/2099 00:00:00'
              True False 1019 0
              True False
              19/01/2011 12:54:54 Entered internal PlaceOrder() method at 19/01/2011 12:54:54: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=0,1M LimitPrice=1,3464 StopPrice=0 SignalName='long_1019' FromEntrySignal=''
              19/01/2011 12:54:54 Ignored PlaceOrder() method: Action=Buy OrderType=Limit Quantity=100000 LimitPrice=1,3464 StopPrice=0 SignalName=long_1019' FromEntrySignal='' Reason='There already is a matching order with same prices and quantity'
              19/01/2011 12:54:54 Cancelled expired order: BarsInProgress=1: Order='8b6afd4974cd468088be3f9f058d84f6/Sim101' Name='long_1019' State=PendingSubmit Instrument='$EURUSD' Action=Buy Limit price=1,3464 Stop price=0 Quantity=0,1M Strategy='Pips3' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='8b6afd4974cd468088be3f9f058d84f6' Gtd='01/12/2099 00:00:00'
              True False 1019 0
              True False
              19/01/2011 12:54:54 Entered internal PlaceOrder() method at 19/01/2011 12:54:54: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=0,1M LimitPrice=1,3464 StopPrice=0 SignalName='long_1019' FromEntrySignal=''
              19/01/2011 12:54:54 Ignored PlaceOrder() method: Action=Buy OrderType=Limit Quantity=100000 LimitPrice=1,3464 StopPrice=0 SignalName=long_1019' FromEntrySignal='' Reason='There already is a matching order with same prices and quantity'
              19/01/2011 12:54:54 Cancelled expired order: BarsInProgress=1: Order='8b6afd4974cd468088be3f9f058d84f6/Sim101' Name='long_1019' State=PendingSubmit Instrument='$EURUSD' Action=Buy Limit price=1,3464 Stop price=0 Quantity=0,1M Strategy='Pips3' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='8b6afd4974cd468088be3f9f058d84f6' Gtd='01/12/2099 00:00:00'
              True False 1019 0
              True False
              19/01/2011 12:54:54 Entered internal PlaceOrder() method at 19/01/2011 12:54:54: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=0,1M LimitPrice=1,3464 StopPrice=0 SignalName='long_1019' FromEntrySignal=''
              19/01/2011 12:54:54 Ignored PlaceOrder() method: Action=Buy OrderType=Limit Quantity=100000 LimitPrice=1,3464 StopPrice=0 SignalName=long_1019' FromEntrySignal='' Reason='There already is a matching order with same prices and quantity'
              19/01/2011 12:54:54 Cancelled expired order: BarsInProgress=1: Order='8b6afd4974cd468088be3f9f058d84f6/Sim101' Name='long_1019' State=PendingSubmit Instrument='$EURUSD' Action=Buy Limit price=1,3464 Stop price=0 Quantity=0,1M Strategy='Pips3' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='8b6afd4974cd468088be3f9f058d84f6' Gtd='01/12/2099 00:00:00'
              True False 1019 0
              True False
              19/01/2011 12:54:54 Entered internal PlaceOrder() method at 19/01/2011 12:54:54: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=0,1M LimitPrice=1,3464 StopPrice=0 SignalName='long_1019' FromEntrySignal=''
              19/01/2011 12:54:55 Ignored PlaceOrder() method: Action=Buy OrderType=Limit Quantity=100000 LimitPrice=1,3464 StopPrice=0 SignalName=long_1019' FromEntrySignal='' Reason='There already is a matching order with same prices and quantity'
              19/01/2011 12:54:55 Cancelled expired order: BarsInProgress=1: Order='8b6afd4974cd468088be3f9f058d84f6/Sim101' Name='long_1019' State=PendingSubmit Instrument='$EURUSD' Action=Buy Limit price=1,3464 Stop price=0 Quantity=0,1M Strategy='Pips3' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='8b6afd4974cd468088be3f9f058d84f6' Gtd='01/12/2099 00:00:00'
              True False 1019 0
              True False
              19/01/2011 12:54:55 Entered internal PlaceOrder() method at 19/01/2011 12:54:55: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=0,1M LimitPrice=1,3464 StopPrice=0 SignalName='long_1019' FromEntrySignal=''
              19/01/2011 12:54:55 Ignored PlaceOrder() method: Action=Buy OrderType=Limit Quantity=100000 LimitPrice=1,3464 StopPrice=0 SignalName=long_1019' FromEntrySignal='' Reason='There already is a matching order with same prices and quantity'
              19/01/2011 12:54:55 Cancelled expired order: BarsInProgress=1: Order='8b6afd4974cd468088be3f9f058d84f6/Sim101' Name='long_1019' State=PendingSubmit Instrument='$EURUSD' Action=Buy Limit price=1,3464 Stop price=0 Quantity=0,1M Strategy='Pips3' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='8b6afd4974cd468088be3f9f058d84f6' Gtd='01/12/2099 00:00:00'
              True False 1019 0
              True False

              Comment


                #8
                these are my settings:


                CalculateOnBarClose = false;
                ExitOnClose = false;
                EntriesPerDirection = 1;
                EntryHandling = EntryHandling.UniqueEntries;
                TraceOrders = true;

                Comment


                  #9
                  and I do resubmit these orders on every tick but they gets cancelled the moment later, you can see that enterlong is submitted and then cancelled on the same tick within a few mseconds.

                  Comment


                    #10
                    It looks there's simply no time to fill them as the competing bar updates from each series just trigger the cancellation / resubmission - I would suggest working with liveUntilCancelled here and then CancelOrder() if needed.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    673 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    379 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    111 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    577 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    582 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X