SetBackOffsetForCalculation
Sets the number of additional bars to include in calculations.
Syntax
SetBackOffsetForCalculation(offset: number): void
Parameters
offset
- A number representing the additional bars to include in calculations.
Return Value
This method does not return a value.
Description
The SetBackOffsetForCalculation
method sets the number of additional historical bars that should be included when calculating the indicator. This is useful for indicators that require more historical data than just the visible range to calculate correctly.
Example
// Include 50 additional bars in calculations
this.api.SetBackOffsetForCalculation(50)
// For indicators that need a lot of historical data
this.api.SetBackOffsetForCalculation(200)
Last updated