MaximumBarsLookBack
<< Click to Display Table of Contents >> MaximumBarsLookBack |
Determines memory performance of custom Series<T> objects (such as Series<double>, Series<long>, etc.). When using MaximumBarsLookBack.TwoHundredFiftySix, only the last 256 values of the series object will be stored in memory and be accessible for reference. This results in significant memory savings when using multiple series objects. In the rare case should you need older values you can use MaximumBarsLookBack.Infinite to allow full access of the series.
Notes: •ISeries<T> objects that hold bar data (such as Close, High, Volume, Time, etc) always use MaximumBarsLookBack.Infinite which ensures all data points are always accessible during the lifetime of your NinjaScript indicator or strategy. •Series<double> objects that hold indicator plot values always use MaximumBarsLookBack.Infinite which ensures that charts always display the entire indicator's calculated values. |
A MaximumBarsLookBack enum value. Default value is MaximumBarsLookBack.TwoHundredFiftySix
Possible values are:
MaximumBarsLookBack.TwoHundredFiftySix |
Only the last 256 values of the series object will be stored in memory and accessible for reference (improves memory performance) |
MaximumBarsLookBack.Infinite |
Allow full access of the series, but you will then not be able to utilize the benefits of memory optimization |
Tip: A MaximumBarsLookBack.TwoHundredFiftySix series works as a circular ring buffer, which will "loop" when the series reaches full capacity. Specifically, once there are 256 entries in the series, new data added to the series overwrite the oldest data. |
MaximumBarsLookBack
Setting all custom series to use the default MaximumBarsLookBack |
---|
Series<double> myDoubleSeries = null; |
Optimizing custom series to use unique MaximumBarsLookBack behavior |
---|
Series<double> myDoubleSeries = null; |