If you up it to 50 and still use the 29 min bars, you end up with 21 left which is enough for example for the EMA 20 to give a reasonable value then.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Trade problem
Collapse
X
-
frostengine, I don't see an issue here - when you're using 30 days back loaded and then add a MinBarsSetting of 29, you effectively have only 1 bar left on which the strategy would run then.
If you up it to 50 and still use the 29 min bars, you end up with 21 left which is enough for example for the EMA 20 to give a reasonable value then.BertrandNinjaTrader Customer Service
-
Perhaps I am thinking about these values incorrectly. What I assumed is having 30 days to load would load the past 30 days worth of values. Then with min bar 29 set it would say that the strategy will not fire until it has at least 29 bars. The strategy trades on 5 minute bars, but also does calculations on the past 20 days closing prices.
So the way I look at this is.. Loads all 30 days worth.. then when it gets to having 29 bars it can start firing.. but would have access to all 29 bars that were loaded previously to this.. So instead of having only 1 bar to calculate the EMA on as you said, i assumed it would have 29 BARS to calculate. Why would it throw out the information for the 29 previously? I would think the point of saying have 29 minimum bars is that you dont want the strategy to fire until its loaded enough data.. after it has 29 bars it has enough so its ok to run the strategy.. but what your saying implies it just loses the 29 bars before this.. If thats the case why set a minimum bar requirement? Seems smarter to leave it at 0 or 1?
That to me doesn't quite explain why the closing price it shows was from 5-25... Shouldn't the closing price be the closing price of the most recent day? I guess there is just some major confusion on my part about what the minimum bars is suppose to represent?
Comment
-
frostengine, the MinBarsRequired has to be satisfied for all series to get an OnBarUpdate() call from your strategy - this has no direct relation to the historical data to load setting, a MinBarsBack of 20 means there's no OnBarUpdate() for the first 20 bars on your chart. You can leave it at 0, however many indicators / strategies need a certain amount to normalize out any erratic start up behavior due to calcs catching up - same would be seen for the unstable indicator period we have on the chart properties for NT 6.5 - this would be 20 bars as well and those would not show per default.BertrandNinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Bertrand View Postfrostengine, the MinBarsRequired has to be satisfied for all series to get an OnBarUpdate() call from your strategy - this has no direct relation to the historical data to load setting, a MinBarsBack of 20 means there's no OnBarUpdate() for the first 20 bars on your chart. You can leave it at 0, however many indicators / strategies need a certain amount to normalize out any erratic start up behavior due to calcs catching up - same would be seen for the unstable indicator period we have on the chart properties for NT 6.5 - this would be 20 bars as well and those would not show per default.
The only thing I can imagine happened is when you tell it load 30 days of data, that is 30 calendar not trading. And therefore it did not get enough bars to satisfy the 29 bars on the daily. That could explain this i suppose?
Thanks for your help
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by zstheorist, Today, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
150 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
||
Started by mattbsea, Today, 05:44 PM
|
0 responses
6 views
0 likes
|
Last Post
by mattbsea
Today, 05:44 PM
|
||
Started by RideMe, 04-07-2024, 04:54 PM
|
6 responses
33 views
0 likes
|
Last Post
by RideMe
Today, 05:31 PM
|
||
Started by tkaboris, Today, 05:13 PM
|
0 responses
6 views
0 likes
|
Last Post
by tkaboris
Today, 05:13 PM
|
Comment