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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        163 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        313 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        245 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        350 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X