IPriceScaleApi
You can retrieve this interface by evoking the following methods of the IPaneApi:
getLeftPriceScales
getRightPriceScales
getMainSourcePriceScale
Methods
getMode
Returns current mode of the price scale
Signature
getMode() => PriceScaleMode
Returns
getStudies
Returns an array of IDs of all studies attached to the price scale
Signature
getStudies() => EntityId[]
Returns
EntityId[]
getVisiblePriceRange
Returns current visible price range of the price scale.
The result is an object with from
and to
,
which are the boundaries of the price scale visible range.
Signature
getVisiblePriceRange() => VisiblePriceRange
Returns
hasMainSeries
Returns true
if the price scale contains the main series
Signature
hasMainSeries() => boolean
Returns
boolean
isAutoScale
Returns true
when the price scale has auto scaling enabled
Signature
isAutoScale() => boolean
Returns
boolean
isInverted
Returns whether the price scale is inverted or not
Signature
isInverted() => boolean
Returns
boolean
isLocked
Returns true
when the price scale is locked
Signature
isLocked() => boolean
Returns
boolean
setAutoScale
Set whether auto scaling should be enabled or not for the price scale
Signature
setAutoScale(isAutoScale: boolean) => void
Parameters
Name | Type | Description |
---|---|---|
isAutoScale | boolean | set to true to enable auto scaling |
Returns
void
setInverted
Changes current inverted state of the price scale
Signature
setInverted(isInverted: boolean) => void
Parameters
Name | Type | Description |
---|---|---|
isInverted | boolean | set to true if the price scale should become inverted |
Returns
void
setLocked
Set whether the price scale should be locked or not
Signature
setLocked(isLocked: boolean) => void
Parameters
Name | Type | Description |
---|---|---|
isLocked | boolean | set to true to lock the price scale |
Returns
void
setMode
Changes current mode of the price scale
Signature
setMode(newMode: PriceScaleMode) => void
Parameters
Name | Type | Description |
---|---|---|
newMode | PriceScaleMode | new mode to set for the price scale |
Returns
void
setVisiblePriceRange
Sets current visible price range of the price scale,
Signature
setVisiblePriceRange(range: VisiblePriceRange) => void
Parameters
Name | Type | Description |
---|---|---|
range | VisiblePriceRange | an object with from and to , which are the boundaries of the price scale visible range. |
Returns
void