Problem with MarketInfo / MODE_TIME

 
Hello,

I would like to get the time of the last tick for a currency that is not the currency where I am running the EA.

According to the doc I make

RefreshRates();
datetime time1 = MarketInfo("EURUSD",MODE_TIME);

but time1 is always 0.

Any idea?

Thanks
 
Are you sure that symbol "EURUSD" is present iin "MarketWatch" window?






//+------------------------------------------------------------------+
//|                                               CheckMODE_TIME.mq4 |
//|                      Copyright © 2007, MetaQuotes Software Corp. |
//|                                        https://www.metaquotes.net/ru/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007, MetaQuotes Software Corp."
#property link      "https://www.metaquotes.net/ru/"
 
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
   
   RefreshRates();
   datetime time1 = MarketInfo("EURUSD",MODE_TIME);   
   Print(time1);
//----
   return(0);
  }
//+------------------------------------------------------------------+
 
Rosh:
Are you sure that symbol "EURUSD" is present iin "MarketWatch" window?


I forgot to mention that I ran this code with the tester on backtest, so maybe that's why....
Reason: