Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancelled historical order

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

    Cancelled historical order

    Hi,

    I have a script that works fine...However if I start it in the middle of a theorical trade it does fine while historical but always cancels all historical orders when turnning into realtime. So, I opted to wait until flat to start a new position, but it never finishes the current position because it automatically cancels the stoporders and the iOrder object becomes null.

    I can see through teh output that the script continues running like Historical even being it realtime data, but once it cancels the stop the position never ends...

    How can I work this ?

    Thanks

    #2
    agenor, I would first of all run the script with TraceOrders enabled and see why the order are exactly getting cancelled in your case.

    Comment


      #3
      This is what is happening.... Consider I am using Exit on Close = False.... The image shows that I'm in the middle of 2 trades...I have marked "Wait until flat before executing live" and the Strategy is yelow in stragegis tab. I have not given such command in script..... The problem is tha tha position will never end once the stopOrder was canceled by the system and its what happens if I coninue the raplay.....And its not the end of the session....Teh second picture shows how the positions should end...


      10/07/2014 11:16:00 Amended open order: Action=Sell OrderType=Stop Quantity=6 LimitPrice=0 StopPrice=53970 SignalName=Stop0' FromEntrySignal='Entry0'
      10/07/2014 11:16:00 Entered internal PlaceOrder() method at 10/07/2014 11:16:00: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=8 LimitPrice=0 StopPrice=54075 SignalName='Stop1' FromEntrySignal='Entry1'
      10/07/2014 11:33:00 Entered internal PlaceOrder() method at 10/07/2014 11:33:00: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=6 LimitPrice=0 StopPrice=54080 SignalName='Stop0' FromEntrySignal='Entry0'
      10/07/2014 11:33:00 Amended open order: Action=Sell OrderType=Stop Quantity=6 LimitPrice=0 StopPrice=54080 SignalName=Stop0' FromEntrySignal='Entry0'
      10/07/2014 11:33:00 Entered internal PlaceOrder() method at 10/07/2014 11:33:00: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=8 LimitPrice=0 StopPrice=54080 SignalName='Stop1' FromEntrySignal='Entry1'
      10/07/2014 11:33:00 Amended open order: Action=Sell OrderType=Stop Quantity=8 LimitPrice=0 StopPrice=54080 SignalName=Stop1' FromEntrySignal='Entry1'
      10/07/2014 11:50:00 Entered internal PlaceOrder() method at 10/07/2014 11:50:00: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=6 LimitPrice=0 StopPrice=54255 SignalName='Stop0' FromEntrySignal='Entry0'
      10/07/2014 11:50:00 Amended open order: Action=Sell OrderType=Stop Quantity=6 LimitPrice=0 StopPrice=54255 SignalName=Stop0' FromEntrySignal='Entry0'
      10/07/2014 11:50:00 Entered internal PlaceOrder() method at 10/07/2014 11:50:00: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=8 LimitPrice=0 StopPrice=54255 SignalName='Stop1' FromEntrySignal='Entry1'
      10/07/2014 11:50:00 Amended open order: Action=Sell OrderType=Stop Quantity=8 LimitPrice=0 StopPrice=54255 SignalName=Stop1' FromEntrySignal='Entry1'
      10/07/2014 12:24:00 Entered internal PlaceOrder() method at 10/07/2014 12:24:00: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=6 LimitPrice=0 StopPrice=54390 SignalName='Stop0' FromEntrySignal='Entry0'
      10/07/2014 12:24:00 Amended open order: Action=Sell OrderType=Stop Quantity=6 LimitPrice=0 StopPrice=54390 SignalName=Stop0' FromEntrySignal='Entry0'
      10/07/2014 12:24:00 Entered internal PlaceOrder() method at 10/07/2014 12:24:00: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=8 LimitPrice=0 StopPrice=54390 SignalName='Stop1' FromEntrySignal='Entry1'
      10/07/2014 12:24:00 Amended open order: Action=Sell OrderType=Stop Quantity=8 LimitPrice=0 StopPrice=54390 SignalName=Stop1' FromEntrySignal='Entry1'
      10/07/2014 12:24:00 Cancelled historical order or prior session: BarsInProgress=0: Order='NT-00094/Replay101' Name='Stop0' State=Working Instrument='WIN 08-14' Action=Sell Limit price=0 Stop price=54390 Quantity=6 Strategy='ScLong' Type=Stop Tif=Day Oco='' Filled=0 Fill price=0 Token='301f9d3dbdc14a459c43d3ffa4319a03' Gtd='01/12/2099 00:00:00'
      10/07/2014 12:24:00 Cancelled historical order or prior session: BarsInProgress=0: Order='NT-00096/Replay101' Name='Stop1' State=Working Instrument='WIN 08-14' Action=Sell Limit price=0 Stop price=54390 Quantity=8 Strategy='ScLong' Type=Stop Tif=Day Oco='' Filled=0 Fill price=0 Token='c1a570d0b2fc4730bbdfc3cd875bc312' Gtd='01/12/2099 00:00:00'
      Attached Files

      Comment


        #4
        agenor, thanks. You submit the order with the TIF = DAY so I would expect those to expire. If you intend to hold overnight / session breaks GTC would be more suited to handle.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        647 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
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X