SetEmptyValue
Sets the value to be used for empty or undefined indicator values.
Syntax
SetEmptyValue(emptyValue: number): void
Parameters
emptyValue
- A number representing the value to use for empty or undefined indicator values.
Return Value
This method does not return a value.
Description
The SetEmptyValue
method defines what value should be used when an indicator value is empty, undefined, or cannot be calculated. This is commonly used to prevent drawing lines or markers when there is insufficient data to calculate the indicator.
Example
// Set empty values to zero
this.api.SetEmptyValue(0)
// Use a negative value to clearly identify missing data points
this.api.SetEmptyValue(-1)
// Common practice is to use a very large negative number
this.api.SetEmptyValue(-999999)
Last updated