Get the current time in HHMMSS format.
Syntax:
1 |
CurrentTime |
Example:
1 2 3 4 5 6 7 8 9 |
//Testing if it's time to wake up ! IF (CurrentTime = 073000) THEN WakeUp = 1 ELSE WakeUp = 0 ENDIF RETURN WakeUp |
hi,
is CurrentTime referred to C.E.T. or other ?
thx
CurrentTime is the one of the official timezone where the instrument is traded.
hi Nicolas,
ok but… if I need to recognize a certain time (i.e. 23.00 C.E.T – with PRT code I mean)….Must I check if we are in
daylight solar time or not and manage the time properly depending on the period of the year ?
I hope to be clear.
thx
I have difficulties using CurrentTime when I use a tick view. Seems like it is not that often updated (in fact updated at the end of a candle), while Time works better (updated each tick). Is this normal because whatever the drawing frame (TimeUnit, Tick), CurrentTime should be updated correctly it is a system call isn’t it?
The code shows the issue, for instance on a 200 tick DOW view.
see attached code
DEFPARAM DRAWONLASTBARONLY = TRUE
ONCE s=5*pipsize
CTC=CurrentTime
CT=Time
BI=barindex
Y=high
DRAWTEXT(“Time: #CT#” , BI, Y+2*s)
DRAWTEXT(“Current time: #CTC#” , BI, Y+1*s)
Return
Bonjour, pour ma part, impossible d’afficher une information sur la derniere barre d’un graph avec un indicateur dans la version 10.3, en effet l’instruction suivante :
currenttime=opentime and date=today
ne fonctionne pas par exemple avec EURUSD car je suis en GMT+2 et le marché est en GMT+1