I was told that:
var HHD = formatPriceNumber(xHHD)*1 ;
Should adjust the decimal places appropriately rather than me specifying the number of places
Mid = xMidPoint.toFixed(2)*1 ;
But I get xx.yyy decimal places (sometimes) instead of xx.yy when I use formatPriceNumber for stocks.
Am I doing something wrong or not doing something right?
Is there a function that would return the number of decimals of an instrument? If so, then I could pass that as a parameter to toFixed().
THANKING YOU IN ADVANCE.
var HHD = formatPriceNumber(xHHD)*1 ;
Should adjust the decimal places appropriately rather than me specifying the number of places
Mid = xMidPoint.toFixed(2)*1 ;
But I get xx.yyy decimal places (sometimes) instead of xx.yy when I use formatPriceNumber for stocks.
Am I doing something wrong or not doing something right?
Is there a function that would return the number of decimals of an instrument? If so, then I could pass that as a parameter to toFixed().
THANKING YOU IN ADVANCE.
Comment