I understand that no calculation is done until after the bar has been closed but it seems that since I am entering a trade based on that bar it would draw the entry/exit markers on that bar and not the next one.
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
entry and exit plots on charts using OnBarClose
Collapse
X
-
entry and exit plots on charts using OnBarClose
I am using the Calculate.OnBarClose to do my calculations for a strategy, my question is, when entering a long or short, the plot markers on the chart show the trade as taking place on the next bar, not the bar that the calculation is actually done on.
I understand that no calculation is done until after the bar has been closed but it seems that since I am entering a trade based on that bar it would draw the entry/exit markers on that bar and not the next one.Tags: None
-
Hello andrewjoseph939,
Thanks for your question. I have moved this thread to the Strategy Development forum as you are referring to NinjaScript strategies.
With Calculate.OnBarClose, the strategy logic is calculated after the bar has closed. The bar is already closed and then the order is submitted, so the order will be filled with the price action that comes after that bar closed. The execution markers will show on the bar where the order was executed.
If you would like to learn more about how orders are filled in a backtest, please see below. (Please note that there is no intrabar movement with a backtest, so fill prices are estimated using "virtual bars" to mimic how the market may have moved.
https://ninjatrader.com/support/help...ical_fill_.htm
Realtime orders will be filled with actual market data after the order is submitted.
Please let us know if you have any additional questions.JimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by mly916, Yesterday, 09:48 PM
|
1 response
11 views
0 likes
|
Last Post Yesterday, 11:54 PM | ||
Started by Mikey_, Yesterday, 09:21 PM
|
0 responses
11 views
0 likes
|
Last Post
by Mikey_
Yesterday, 09:21 PM
|
||
Started by cre8able, Yesterday, 05:53 PM
|
3 responses
14 views
0 likes
|
Last Post
by cre8able
Yesterday, 09:20 PM
|
||
Started by Aryan Kumar, Yesterday, 09:04 PM
|
0 responses
4 views
0 likes
|
Last Post
by Aryan Kumar
Yesterday, 09:04 PM
|
||
Started by yertle, 03-27-2024, 05:49 PM
|
3 responses
16 views
0 likes
|
Last Post
by Mindset
Yesterday, 08:38 PM
|
Comment