Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to submit order that cancel on the close of the bar that the order is submitted

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

    How to submit order that cancel on the close of the bar that the order is submitted

    Hi,

    I have two bar series on my chart, 1 minute(primary) and 3 minute.

    I submit order using:
    EnterLongLimit(1, false, ...).

    However, the order is canceled one minute later. (I was expecting it would be canceled on close of a 3 minute bar since I use '1' for barsInProgress).

    What is the best way to have my order canceled on close of the 3 minute bar?

    Thanks.

    #2
    Hello hongchen2000,

    Thank you for your post.

    The orders will stay active as per the primary data series when using multi-time frame, in your case the 1 minute.

    Please see our Strategy: Keeping orders alive reference sample for more information:



    Please let me know if you have any questions.
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    68 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    62 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X