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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      152 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      89 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      131 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      127 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      107 views
      0 likes
      Last Post CarlTrading  
      Working...
      X