The integer denominator of the tick size: 100 for two-decimal prices, 10000 for four.
syminfo.pricescale is a simple int, a power of ten for decimal markets: 100 when prices have two decimals, 100000 for a five-digit forex quote. The tick size is syminfo.minmove divided by it.
Multiply a price by it to get an integer count of the smallest fractions, handy when you need an exact comparison without float rounding.
Type
simple int
Remarks
- To get the number of decimals, count the digits of the pricescale after the leading 1.
- On Sidechair: not supported yet; a script that reads
syminfo.pricescalestops with the error "syminfo.pricescale" isn't supported yet. Usesyminfo.mintick, which the engine does run.
Example
//@version=6
indicator("Price in minimum fractions")
whole = math.round(close * syminfo.pricescale)
plot(whole, "Price x pricescale", color.purple)See also
Not on Sidechair yet