Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629
|
TraderWalrus,
you can't just subtract these time values without running into the issue you describe - it would be the same for "Time - Time[1]". One approach is to use the TimeToSeconds function to convert the time to seconds (for both time values) and then build the difference between seconds.
Keep in mind that you might get negative times in case the previous bar is on the previous day, while the current bar is on the current day.
Regards,
ABCTG
|