This reports only HH:MM:SS so it’s planned only for intraday TF’s.
TZoffest is the distance from the default local TZ as displayed by PRT.
Due to a large text to be displayed, I added the EveryNbars variable to set the distance between adjacent bars .
If the string is too large you can remove “:” from DrawText.
You could also remove MySec from DrawText for TF’s >= 1 minute.
(not tested)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
EveryNbars = 5
TZoffset = 6 //-23 to +23
MyTime = OpenTime
MySec = MyTime - (round ((MyTime/ 100 ) - 0.5 ) * 100 )
MyHour = OpenHour
MyMin = OpenMin
Temp = MyHour + TZoffset
If Temp > 23 then
Temp = Temp - 24
Elsif Temp < 0 then
Temp = Temp + 24
Endif
MyHour = Temp
If (BarIndex MOD EveryNbars) = 0 then
DrawText (“#MyHour#:#MyMin#:#MySec#”,BarIndex,0)
Endif
Return
the new OpenTime will be displayed at level 0.