IdeaRe: MQL4 how get the time from 00:00:00 (day start time)

2
baraozemo wrote:Hi,

(mt5) 

I need to get the datetime 00:00 from the current day..
is this correct? (is not working)...

datetime start=D'00:00:00'
You are missing the day part in that format
You can not do that that way. Try like this :

Code: Select all

   datetime start = StringToTime(TimeToString(TimeCurrent(),TIME_DATE));

or use the specific time for specific bar instead of the TimeCurrent() to get day part for that bar


Who is online

Users browsing this forum: No registered users and 11 guests