I need some help in determining the precision (i.e # of decimal digits after the decimal point) for an instrument.
I am writing an indicator where I am printing price values on the chart but for formatting the number I am simply using a fixed format code (like .."N2" etc). This is okay if the instrumnet tick precision id 2-decimal (like the ES) but not otherwise like for the EURO (precision is 4-digit).
Any ideas on how to get the precision or how to format the number to the correct precision would be appreciated.
Thanks.
Comment