Page 1 of 1

timetoseconds bug

Posted: Aug 22 2013
by waveslider
Hi,
To replicate, insert "timetoseconds(time_s)-timetoseconds(time_s)[1]" into a custom indicator on a volume chart
On the first tick after 2359 time finishes and a new day begins, the reading is inaccurate.

thanks

Re: timetoseconds bug

Posted: Aug 22 2013
by TJ
Hi,
To replicate, insert "timetoseconds(time_s)-timetoseconds(time_s)[1]" into a custom indicator on a volume chart
On the first tick after 2359 time finishes and a new day begins, the reading is inaccurate.
thanks
Can you describe what do you mean by "the reading is inaccurate"?
What results do you have?

Re: timetoseconds bug

Posted: Aug 22 2013
by waveslider
I have a difference of -86,211 seconds between the bar ending at 23:58 and the bar ending at 00:01

Re: timetoseconds bug

Posted: Aug 22 2013
by TJ
I have a difference of -86,211 seconds between the bar ending at 23:58 and the bar ending at 00:01
What result are you expecting?

Re: timetoseconds bug

Posted: Aug 22 2013
by TJ
try this test:

Code: Select all

var:
tts1(0),
tts2(0);

tts1 = timetoseconds(time_s);
tts2 = timetoseconds(time_s)-timetoseconds(time_s)[1];

plot100(tts1, "TTs1") // plot as a line;
plot110(tts2, "TTs2") // plot as a line;