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
timetoseconds bug
-
- Posts: 223
- Joined: 16 Oct 2011
- Has thanked: 66 times
- Been thanked: 20 times
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: timetoseconds bug
Can you describe what do you mean by "the reading is inaccurate"?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
What results do you have?
-
- Posts: 223
- Joined: 16 Oct 2011
- Has thanked: 66 times
- Been thanked: 20 times
Re: timetoseconds bug
I have a difference of -86,211 seconds between the bar ending at 23:58 and the bar ending at 00:01
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: timetoseconds bug
What result are you expecting?I have a difference of -86,211 seconds between the bar ending at 23:58 and the bar ending at 00:01
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: timetoseconds bug
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;