DecimalsOfInstrument
Jump to navigation
Jump to search
The DecimalsOfInstrument returns the number of decimals of an instrument.
Code
DecimalsOfInstrument = Round(Log(PriceScale) / Log(10), 0);
Usage
if (LastBarOnChart_s = True) then
Print(GetSymbolName, " - ", DecimalsOfInstrument);
returns
6E - 4.00
In this example, the 6E has four decimals (e.g. 1.3012).