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!
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
NinjaTrader
Enter trade on the open of the next bar.
Collapse
X
-
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.Tags: None
-
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.
JesseNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by WHICKED, 03-27-2024, 12:33 PM
|
4 responses
42 views
0 likes
|
Last Post Today, 12:28 AM | ||
Started by f.saeidi, Today, 12:12 AM
|
0 responses
3 views
0 likes
|
Last Post
by f.saeidi
Today, 12:12 AM
|
||
Started by Conall, Today, 12:06 AM
|
0 responses
5 views
0 likes
|
Last Post
by Conall
Today, 12:06 AM
|
||
Started by proptradingshop, 03-21-2024, 09:50 AM
|
6 responses
27 views
0 likes
|
Last Post Today, 12:02 AM | ||
Started by mly916, Yesterday, 09:48 PM
|
1 response
14 views
0 likes
|
Last Post Yesterday, 11:54 PM |
Comment