Keenbase Trading » Blog » Setting the GMT Offset

We hope you enjoy reading this blog post.

Become a Pro Trader by using our fine-tuned Indicators and Expert Advisors.

How to set the correct GMT Offset in EA (Expert Advisor)

how to set correct gmt offset in expert advisor

Setting the correct GMT offset is a crucial step to ensure the proper working of an Expert Advisor. But first, we have to understand what exactly is the GMT offset and why it is essential.

Suppose you use an EA that opens a long position at the start of the European session and exits the position at the end.

The European session starts at 7 a.m. and ends at 4 p.m. GMT. Therefore, to execute the above logic, the expert advisor has to fetch the correct GMT timings in Metatrader.

The problem is, Metatrader can calculate the correct GMT using the server time, but the server time differs from broker to broker. Therefore, you must set the proper GMT offset according to your broker server time.

Follow these steps:

Check your broker time using the Market Watch window in Metatrader.

How to set correct GMT Offset in Expert Advisor

Now check the current GMT below:



Example 1

  • Broker Time: 15:00
  • GMT: 13:00
  • GMT Offset: 15:00 - 13:00 = 2

Example 2

  • Broker Time 07:00
  • GMT: 09:00
  • GMT Offset: 07:00 - 09:00 = -2

Take Your Trading to Next Level

You Might Also Like: