Skip to main content
Version: v25

IPriceScaleApi

Interface

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

PriceScaleMode


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

VisiblePriceRange


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

NameTypeDescription
isAutoScalebooleanset to true to enable auto scaling

Returns

void


setInverted

Changes current inverted state of the price scale

Signature

setInverted(isInverted: boolean) => void

Parameters

NameTypeDescription
isInvertedbooleanset 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

NameTypeDescription
isLockedbooleanset to true to lock the price scale

Returns

void


setMode

Changes current mode of the price scale

Signature

setMode(newMode: PriceScaleMode) => void

Parameters

NameTypeDescription
newModePriceScaleModenew 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

NameTypeDescription
rangeVisiblePriceRangean object with from and to, which are the boundaries of the price scale visible range.

Returns

void