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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      164 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      319 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      246 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