Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Always use limitOrder with "liveUntilCancelled" in slow markets ... ?

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

    Always use limitOrder with "liveUntilCancelled" in slow markets ... ?

    Hi,

    I have seen weird case when using limit-orders which are only active for the current bar.

    When trading in markets which are very slow and doesn't produce many ticks per minute (e.g. overnight 6E germany time) then I use the following order:

    Code:
    targetOrder = ExitShortLimit (0, false, quantity, targetLevel, "Profit-Target", entryOrder.Name);
    The second parameter indicates that this order is only active for the current bar, so at the next bar I have to reset the order.

    Now I'm working on M1-Timeframe and sometimes after midnight I see in my log that the limit order is cancelled ... after testing with the replay connection I can reproduce the following ...

    00:26 - Orders placed, all seems to be ok.
    00:27 - Orders placed again, because I need to set it for everey bar
    00:28 - ...
    00:29 - ...
    00:30 - Order: Type = Limit State = Cancelled

    There is no new bar on 00:30 because there are limited ticks in the market, so the next bar opens at 00:30 plus 10 seconds, and right before the 10 seconds the Limit-Order is cancelled.

    So I need some confirmation about this. Is my assumption correct that in a slow market the orders are cancelled on a new bar, when there are no new ticks for the new bar ... after 10 seconds of inactivity?

    So for this case I need to use always "liveUntilCancelled" configuration of orders?

    Thx,
    DT

    #2
    DT, there's no set time when the order will expire in this case, when you have a slow market like this it will be cancelled when the next open tick for a new bar arrives (with liveUntilCancelled to false).

    Comment


      #3
      Ok, thx for the answer ... but the posted flow is exactly that what happens in my case. Only with liveUntilCancelled = true the orders are not cancelled. It is very easy to reproduce ... maybe it is a bug in NT ... don't know ... but the workaroung works for me ...

      Thx,
      DT

      Comment


        #4
        Please use TraceOrders = true to see the exact reason it was cancelled.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, Yesterday, 10:06 AM
        0 responses
        20 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        18 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        14 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        9 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        40 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X