Skip to main content

Interface: IPriceFormatter

Charting Library.IPriceFormatter

Specific formatter for numbers

Hierarchy

Methods

format

format(price, signPositive?, tailSize?, signNegative?, useRtlFormat?, cutFractionalByPrecision?): string

Price Formatter

Parameters

NameTypeDescription
pricenumberprice
signPositive?boolean-
tailSize?numberadd tailSize digits to fractional part of result string
signNegative?booleanadd minus sign to result string.
useRtlFormat?booleanUse Right to left format
cutFractionalByPrecision?booleancuts price by priceScalePrecision, without rounding.

Returns

string

formatted price

Overrides

ISymbolValueFormatter.format


formatChange

formatChange(currentPrice, prevPrice, signPositive?): string

Formatter for a price change

Parameters

NameTypeDescription
currentPricenumbercurrent price
prevPricenumberprevious price
signPositive?booleanis the sign of the number positive

Returns

string

Inherited from

ISymbolValueFormatter.formatChange