Hello
Is there a way to get the ending time of the next following bar?
Time: Actual bar ending
Time[1] :Last bar ending
Next bar ending ?
Martin
Next bar ending time, how to calculate
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Next bar ending time, how to calculate
There is no ONE solution for all situations.Hello
Is there a way to get the ending time of the next following bar?
Time: Actual bar ending
Time[1] :Last bar ending
Next bar ending ?
Martin
if it is a non-time-based chart, or a seconds chart,
the next bar is TIME_s plus 1 second.
if it is a minute chart,
the next bar is TIME plus BARINTERVAL.
except... when the time is at the top of the hour,
you might get funny invalid time (eg. 1030 + 60 = 1090).
To calculate the time properly,
you will need to use TimeToMinutes(eTime) to convert the time.
See this chapter for detail:
EasyLanguage Reference Guide
Manipulating Dates and Times.......... pg. 15