TimeTradeServer() equavalent

 
Hello, is there a TimeTradeServer(); in MQL4?
 
Ying Siang Ng:
Hello, is there a TimeTradeServer(); in MQL4?

Unfornutately no , you can capture the deviation from gmt live (each week) and use that to keep tabs on the broker time .

I guess if its a crypto broker (if it exists with mt4) it could have a constantly live clock for ticks.

 
  1. Perhaps you should read the manual and you would know the answer. List of MQL4 Functions - MQL4 Reference
       How To Ask Questions The Smart Way. (2004)
          How To Interpret Answers.
             RTFM and STFW: How To Tell You've Seriously Screwed Up.

  2. Just code one.

    Not tested, not compiled, just typed.

    class TimeTradeServer{
     public:
       void on_tick(){ offset = TimeCurrent() - TimeLocal(); }
       datetime get(){ return TimeLocal() + Offset;          }
     private:
       long offset;
    } // TimeTradeServer 
    Not tested, not compiled, just typed.