On a 50 tick chart I’d like to display both an imported global value and how many seconds into a minute the bar is. The seconds values is an ad hoc timer. To avoid the imported value which can have up to 6 digits overwriting the timer, I thought I’d try multiplying the seconds value by .00001 so that the last two digits will always jut out beyond the global value. To do this I’ve defined the following three variables:
VolGR = getGlobalValue("VolG");
today = new Date();
Timer = today.getSeconds(0) * .00001;
And I use the following return statement:
Return new Array(Timer, VolGR);
But after the first nine seconds of the minute the returned Timer value does not show the last significant digit in the X Axis. It works fine for the first nine seconds of the minute displaying the correct values but consistently displays only .00001 between the 10th and 19th seconds and .00002 between the 20th and 29th seconds, truncating the final digit. This is curious because the correct values, .000011, .000012, etc are being displayed in the cursor window. I’ve tried adding the statements:
Timer = Timer.toFixed(6)
and when that didn’t work tried
Timer = Timer.toFixed(6) *1
but to no avail. Can anyone suggest a method for forcing the display of the last digit on the X axis? Thanks for any feedback.
Mike
VolGR = getGlobalValue("VolG");
today = new Date();
Timer = today.getSeconds(0) * .00001;
And I use the following return statement:
Return new Array(Timer, VolGR);
But after the first nine seconds of the minute the returned Timer value does not show the last significant digit in the X Axis. It works fine for the first nine seconds of the minute displaying the correct values but consistently displays only .00001 between the 10th and 19th seconds and .00002 between the 20th and 29th seconds, truncating the final digit. This is curious because the correct values, .000011, .000012, etc are being displayed in the cursor window. I’ve tried adding the statements:
Timer = Timer.toFixed(6)
and when that didn’t work tried
Timer = Timer.toFixed(6) *1
but to no avail. Can anyone suggest a method for forcing the display of the last digit on the X axis? Thanks for any feedback.
Mike
Comment