double ldHour = TimeHour(MarketInfo(Symbol(), MODE_TIME)); double ldMin = TimeMinute(MarketInfo(Symbol(), MODE_TIME)); Comment("server time:",ldHour ,":",ldMin );for the vert lines you can use https://docs.mql4.com/objects/ObjectCreate
hth
Comment("server time:",Hour() ,":",Minute() ); //also possible
Russell:
Muchas Gracias Señor!
Here is a bit of code I wrote to display 12 Hour format with AM & PM. It also adds a 0 in front of single digit minutes and hours (1-9):
int hour = Hour(); int minute = Minute(); string zeroHour = ""; string zeroMinute = ""; string ampm = ""; if (hour < 10) zeroHour = "0"; else zeroHour = ""; if (minute < 10) zeroMinute = "0"; else zeroMinute = ""; if (hour > 12) ampm = " PM"; else ampm = " AM"; if (hour > 12) hour = hour - 12; ObjectCreate("Time", OBJ_LABEL, 0, 0, 0); ObjectSetText("Time", "Server Time: "+zeroHour+hour+":"+zeroMinute+minute+ampm, 9, "System", Orange); ObjectSet("Time", OBJPROP_CORNER, 1); ObjectSet("Time", OBJPROP_XDISTANCE, 5); ObjectSet("Time", OBJPROP_YDISTANCE, 50);

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Thanks for any and all assistance.