SetFixedMinMaxValues
Sets fixed minimum and maximum values for the indicator's scale.
Syntax
SetFixedMinMaxValues(aMin: number, aMax: number): void
Parameters
aMin
- A number representing the minimum value for the indicator's scale.aMax
- A number representing the maximum value for the indicator's scale.
Return Value
This method does not return a value.
Description
The SetFixedMinMaxValues
method sets fixed minimum and maximum values for the indicator's scale. This is particularly useful for oscillators and other indicators that should be displayed within a specific range.
Example
// Set fixed scale for RSI (0-100)
this.api.SetFixedMinMaxValues(0, 100)
// Set fixed scale for Stochastic (0-100)
this.api.SetFixedMinMaxValues(0, 100)
// Set custom range for an oscillator (-50 to 50)
this.api.SetFixedMinMaxValues(-50, 50)
Last updated