Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using liveUntilCancelled

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

    Using liveUntilCancelled

    At this point I'm just trying to understand how the some of the limit order-related events are processed.

    My understanding is if I use EnterLongLimit( ) and set liveUntilCancelled = false then the limit order will be cancelled at the end of the current bar (i.e., the next time OnBarUpdate() is called. Is this correct?

    However, if I set liveUntilCancelled = true then the limit order will stay active until any of the 3 events occur: 1) the order is filled, 2) it expires, or 3), the CancelOrder() method is call. Is this correct?

    Please let me know if I'm missing something (anything) that will help w/using liveUntilCancelled.

    Thx,
    Lou

    #2
    Hi Lou,

    Yes, that all sounds right. You'll also have to structure order objects as IOrders, in order to use CancelOrder() command. We have a sample on that available that here:
    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
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Okay, thx. Yes, I'm already using IOrders for market orders so that shouldn't be an issue.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      574 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      332 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X