haidzatul posted # :
Any idea to use this function?
in MQL5 i use this
MqlDateTime hari,jam ;
Print("Day of Week =",hari.day_of_week);
Print("Hour =",jam.hour);
the result
Day of Week = 0
Hour = 0
Actually i want to coding similar like this in MQL4, like this
Print("Day of Week =",DayOfWeek());
help me?
Your MqlDateTime line only declares the structure and you need another command such as TimeCurrent to populate it. This is documented in the MQL5 editor help.
MqlDateTime hari; TimeCurrent(hari); Print("Day of Week =",hari.day_of_week); Print("Hour =",hari.hour);
Paul
phampton:
Your MqlDateTime line only declares the structure and you need another command such as TimeCurrent to populate it. This is documented in the MQL5 editor help.
Paul
it's work
Thank Paul

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
Any idea to use this function?
in MQL5 i use this
MqlDateTime hari,jam ;
Print("Day of Week =",hari.day_of_week);
Print("Hour =",jam.hour);
the result
Day of Week = 0
Hour = 0
Actually i want to coding similar like this in MQL4, like this
Print("Day of Week =",DayOfWeek());
help me?