timetoseconds bug

Questions about MultiCharts and user contributed studies.
waveslider
Posts: 222
Joined: 16 Oct 2011
Has thanked: 66 times
Been thanked: 20 times

timetoseconds bug

Postby waveslider » 22 Aug 2013

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

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: timetoseconds bug

Postby TJ » 22 Aug 2013

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?

waveslider
Posts: 222
Joined: 16 Oct 2011
Has thanked: 66 times
Been thanked: 20 times

Re: timetoseconds bug

Postby waveslider » 22 Aug 2013

I have a difference of -86,211 seconds between the bar ending at 23:58 and the bar ending at 00:01

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: timetoseconds bug

Postby TJ » 22 Aug 2013

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?

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: timetoseconds bug

Postby TJ » 22 Aug 2013

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;


Return to “MultiCharts”