Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy automation: Keep limit order active for several bars in a row (user defined)

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

    Strategy automation: Keep limit order active for several bars in a row (user defined)

    For strategy automation it would be very useful to have an option to keep limit orders active for several bars in a row (should be user defineable), so that the limit order maintains its place in the queue and doesn't get cancelled after the bar where the order was generated, but didn't get filled. This gets actual trading results much closer to backtesting results when using limit orders. The order should stay active until the defined "max bars active" setting is reached or a new order with a different price is generated. This feature should be an option (selectable by radio button for example).

    #2
    Originally posted by Breed View Post
    For strategy automation it would be very useful to have an option to keep limit orders active for several bars in a row (should be user defineable), so that the limit order maintains its place in the queue and doesn't get cancelled after the bar where the order was generated, but didn't get filled. This gets actual trading results much closer to backtesting results when using limit orders. The order should stay active until the defined "max bars active" setting is reached or a new order with a different price is generated. This feature should be an option (selectable by radio button for example).
    Already exists. Just read the NT Help. Search for "liveuntilcancelled".

    Comment


      #3
      Welcome to the forums here breed and thanks for sharing this enhancement suggestion - I've added it under id 2237 to our trackings done in product management.

      As koganam kindly stated, orders are available to get set 'live until cancelled' overriding the default NT behavior to expire at the next bar update. However it would be then up to your code to CancelOrder() these as needed.



      When using NinjaTrader's Enter() and Exit() methods, the default behavior is to automatically expire them at the end of a bar unless they are resubmitted to keep them alive. Sometimes you may want more flexibility in this behavior and wish to submit orders as live-until-cancelled. When orders are submitted as live-until

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      132 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      74 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      117 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      113 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      89 views
      0 likes
      Last Post CarlTrading  
      Working...
      X