I am trying to get the time lapsed since the beginning of the bar. It is a 5 min chart, and I would like to get the lapse time in seconds.
I wrote the code below, but it does not compile. Any help is appreciated.
if barstart <> currentbar then begin
barstart = currentbar ;
starttime = TimeToSeconds(time);
timelapsed = endtime - starttime ;
Time Lapsed since beginning of bar
Questions about MultiCharts and user contributed studies.
3 posts • Page 1 of 1