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
Exits
Collapse
X
-
Hello cfree5119,
Thank you for your post.
Using 'CalculateOnBarClose = false' you can ensure your exit condition is sent immediately. CalculateOnBarClose is called within the Initialize() method.
When using 'CalculateOnBarClose = true' if your condition is met the order is submitted to the next bar after the condition.
For information on CalculateOnBarClose please visit the following link: http://www.ninjatrader.com/support/h...onbarclose.htm
Please let me know if I may be of further assistance.
-
Hello cfree5119,
Thank you for your response.
You can separate your logic to either calculate on bar close or on every incoming tick. For a reference sample please visit the following link: http://www.ninjatrader.com/support/f...ad.php?t=19387
Please let me know if I may be of further assistance.
Comment
-
Hello cfree5119,
Thank you for your post.
Unfortunately, CalculateOnBarClose = false will not work with historical data. When indicators or strategies are running on historical data, OnBarUpdate() is only called on the close of each historical bar even if this property is set to false. This is due to the fact that with a historical data set, only the OHLCVT of the bar is known and not each tick that made up the bar.
For more information on CalculateOnBarClose please visit the following link: http://www.ninjatrader.com/support/h...onbarclose.htm
Please let me know if I may be of further assistance.
Comment
-
With that information is has knowledge of the range. If the stop is within a given range is there a way for it to execute at it's stop price regardless the incoming tick or how it would normally be executed with present market conditions? SO the stop would fire at the price so long as it is contained in the range. I am just trying to make my backtests as accurate as possible. Thank you.
Comment
-
cfree5119, to simulate this with more accuracy, you would need add a finer intraday series here that would offer more testing resolution, you could then submit your orders to this finer series in backtesting - http://www.ninjatrader.com/support/f...ead.php?t=6652BertrandNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by arvidvanstaey, Today, 02:19 PM
|
0 responses
2 views
0 likes
|
Last Post Today, 02:19 PM | ||
Started by mmckinnm, Today, 01:34 PM
|
3 responses
5 views
0 likes
|
Last Post Today, 02:12 PM | ||
Started by f.saeidi, Today, 01:32 PM
|
2 responses
5 views
0 likes
|
Last Post
by f.saeidi
Today, 02:10 PM
|
||
Started by alifarahani, 04-19-2024, 09:40 AM
|
9 responses
55 views
0 likes
|
Last Post Today, 02:02 PM | ||
Started by Conceptzx, 10-11-2022, 06:38 AM
|
3 responses
60 views
0 likes
|
Last Post Today, 01:46 PM |
Comment