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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    164 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    85 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    127 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    207 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    185 views
    0 likes
    Last Post CarlTrading  
    Working...
    X