Hello. I have been trying to make this code round my output to the nearest tenth of a digit for the Russel 2000 e-mini. I.e. - 78118 would be 781.20 or 78120. Any ideas? Thanks...
//==rnd will round to N digits.
function rnd(value, N) {
var n;
var mult=1;
for(n=0;n<N;n++) mult*=100;
value*=mult;
return Math.round( value,N)/mult;
}
//==rnd will round to N digits.
function rnd(value, N) {
var n;
var mult=1;
for(n=0;n<N;n++) mult*=100;
value*=mult;
return Math.round( value,N)/mult;
}
Comment