Sidechair

syminfo.pricescale

Browse the reference

The integer denominator of the tick size: 100 for two-decimal prices, 10000 for four.

Try it in the editor

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.pricescale stops with the error "syminfo.pricescale" isn't supported yet. Use syminfo.mintick, which the engine does run.

Example

Pine ScriptPrice as a whole number of ticksOpen in editor
//@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