how to Know GMT Shirt of Broker Server.

 

Dear Guys,

is there any function in MQL to know what GMT Shirt use Broker in MT4. or is there any function to EA know auto what is the GMT using broker?

 

Thanks in Advanced 

 
capilta: what GMT Shirt use Broker in MT4. or is there any function to EA know auto what is the GMT using broker?
  1. "GMT Shirt use Broker" is unintelligible. If you are using a machine translation, you must use simple sentence structure.
  2. "GMT using broker" GMT/UTC has nothing to do which a broker. Each broker decides what time zone their server uses.
  3. Alphabetic Index of MQL4 Functions (600+) - MQL4 forum specifically TimeGMT
 
WHRoeder:
capilta: what GMT Shirt use Broker in MT4. or is there any function to EA know auto what is the GMT using broker?
  1. "GMT Shirt use Broker" is unintelligible. If you are using a machine translation, you must use simple sentence structure.
  2. "GMT using broker" GMT/UTC has nothing to do which a broker. Each broker decides what time zone their server uses.
  3. Alphabetic Index of MQL4 Functions (600+) - MQL4 forum specifically TimeGMT



WHRoeder: "GMT Shirt use Broker" is probable only a typo as r and f (=> GMT Shift use Broker) are next to each other on the keyboard.

capilta: Mt4 provides TimeCurrent() (=server time) and TimeGMT (since b600) which is your local pc-GMT. So if you calc: TimeCurrent()-TimeGMT() you'll have:

the broker-GMT-ShiFt inclusive 1) their DST and 2) the latency due to the the remote MT4-server and the internet and 3) the time difference of your pc-GMT to the 'real' GMT.

So you need to round to full halve hours: datetime shift = (datetime)(TimeHour(TimeCurrent() - TimeGMT() + 600)*3600); // UNTESTED!!

And this works only(!!) if the markets aren't closed!! Otherwise you'll get ridiculous numbers!

You'd better calc this difference every Sunday night after the market has opened as USA, EU and Australia do have different weekends when they change their DST. And if you back test the DST becomes more gormless as it has been changed several times :(

Gooly

Reason: