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 NullPointStrategies, Today, 05:17 AM
    0 responses
    44 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    65 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X