Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
MaximumBarsLookBack for specific indicator variables?
Collapse
X
-
MaximumBarsLookBack for specific indicator variables?
On a chart with Time Frame > Bars to Load > 3000, a custom moving average indicator plots four lines with variables calculated on values both under 256 bars and over 256, for example, values of 50, 100, 200, and 400 bars. If MaximumBarsLookBack is set to 256, memory is optimized, but the 400 variable line does not plot. If MaximumBarsLookBack is set to Infinite, all lines plot but memory is not optimized. Is it possible to define MaximumBarsLookBack for each individual variable of an indicator so that values under 256 realize resource utilization benefits from MaximumBarsLookback 256, while only values over 256 use MaximumBarsLookback Infinite? If individual variable configuration is not available, is it possible to set MaximumBarsLookBack to a value other than 256 or Infinite, say to 400 in this case?Tags: None
-
Hello Lancer,
MaximumBarsLookBack is set for the Strategy which loads the data and provides this to the indicator. MaximumBarsLookBack can be set in State.SetDefaults of the Strategy's OnStateChange method.
If a hosted indicator is calling AddDataSeries for an added series and sets MaximumBarsLookBack, the host strategy will also need to add that same series and both scripts will need to explicitly use the same MaximumBarsLookBack in the code.
Chelsea B.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by strategist007, Today, 07:51 PM
|
0 responses
2 views
0 likes
|
Last Post Today, 07:51 PM | ||
Started by StockTrader88, 03-06-2021, 08:58 AM
|
44 responses
3,968 views
3 likes
|
Last Post
by jhudas88
Today, 06:59 PM
|
||
Started by rbeckmann05, Today, 06:48 PM
|
0 responses
4 views
0 likes
|
Last Post
by rbeckmann05
Today, 06:48 PM
|
||
Started by rhyminkevin, Today, 04:58 PM
|
4 responses
58 views
0 likes
|
Last Post
by dp8282
Today, 06:13 PM
|
||
Started by iceman2018, Today, 05:07 PM
|
0 responses
6 views
0 likes
|
Last Post
by iceman2018
Today, 05:07 PM
|
Comment