Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter trade on the open of the next bar.

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

    Enter trade on the open of the next bar.

    How would I get my strategy to enter a trade at the open of the next candle after a MA cross? I also have it checking for a close lower or higher depending on the direction of the cross.

    #2
    Hello james13501,

    Thank you for the post.

    This depends on how closely you want to submit to the open, If you are submitting orders OnBarClose, the event which opens the bar is also the event which closes the bar so the Close price can be the open price in a lot of cases. There can be some variation in price there so if you instead wanted to actually wait for the first tick of the next bar, you would need to use Calculate.OnEachTick and the IsFirstTickOfBar property. https://ninjatrader.com/support/help...ghtsub=isfirst

    As shown in the sample, you could reference the 1 bars ago value with the indicators your check at that time to know what the value was during the last closed bar. This is not something which can be done in the strategy builder and would need to be manually coded.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

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