Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,404 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by Shai Samuel, 07-02-2022, 02:46 PM
      4 responses
      95 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by DJ888, Yesterday, 10:57 PM
      0 responses
      8 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by MacDad, 02-25-2024, 11:48 PM
      7 responses
      160 views
      0 likes
      Last Post loganjarosz123  
      Started by Belfortbucks, Yesterday, 09:29 PM
      0 responses
      9 views
      0 likes
      Last Post Belfortbucks  
      Working...
      X