Download MetaTrader 5

Wrong TimeCurrent()?

To add comments, please log in or register
Traders have already contributed more than 300 articles. Write your own one!
Jinsong Zhang
15589
Jinsong Zhang 2010.07.17 12:04 

 I try Print(TimeCurrent()); but it seem not right, please see pic:

 

Why? 

Jinsong Zhang
15589
Jinsong Zhang 2010.07.17 12:12  

And, when I try it in "D1" timeframe, the script don't work until remove it.

Alexey Da
Moderator
6605
Alexey Da 2010.07.19 15:25  

1. Read help topic https://www.mql5.com/en/docs/dateandtime/timecurrent

2. Did you get some errors in Experts journal in your client terminal?
Documentation on MQL5: Date and Time / TimeCurrent
  • www.mql5.com
Date and Time / TimeCurrent - Documentation on MQL5
Jinsong Zhang
15589
Jinsong Zhang 2010.07.20 07:06  
alexvd:

1. Read help topic https://www.mql5.com/en/docs/dateandtime/timecurrent

2. Did you get some errors in Experts journal in your client terminal?
There are no any error message in Journal at that time.
Alexey Da
Moderator
6605
Alexey Da 2010.07.20 16:51  

Unfortunatelly I can not reproduce your situation. 

Try to run this EA.

//+------------------------------------------------------------------+
//|                                            TimeCurrentOnTick.mq5 |
//|                                  2009, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "2009, MetaQuotes Software Corp."
#property link      "http://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   Print(TimeCurrent());
  }
//+------------------------------------------------------------------+

 

 

To add comments, please log in or register