Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancel order

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

    Cancel order

    Hi

    i don't find on the Ninja Trader Guide the code to say:

    If the " entry order" is not filled in the next 5 minutes... cancel the "entry order"

    Can you help ?

    Thx
    Thomas

    #2
    Hi Thomas, there is no such method in NinjaTrader. You will need to manually keep track of the time you submitted the order and then once a certain amount of time has passed, cancel the order.

    There is, however, a feature of NinjaTrader that is very similar to what you're trying to do. By default, when you submit a stop/limit order, if it is not filled by the time the next bar is called, it will be canceled. So, if you're using 5 minute bars and using liveUntilCancelled = false (the default), this should already be happening.
    AustinNinjaTrader Customer Service

    Comment


      #3
      In fact this is for the back testing, so i don't use liveUntilCancelled

      Comment


        #4
        Thomas, liveUntilCancelled is exactly the same for backtesting and real-time trading.
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kinfxhk, 07-14-2026, 09:39 AM
        0 responses
        127 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 10:18 AM
        0 responses
        105 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 09:50 AM
        0 responses
        85 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 07:21 AM
        0 responses
        105 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-11-2026, 02:11 AM
        0 responses
        86 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X