EA Operation Hours Change Because Of GMT , Please Help Me

 
I am using my ea it works in GMT+2 (Winter Time)
My EA Works Very Well And On Time ( Winter Time )
And Recently The Broker I'm Using Has Changed To Summer Time GMT +3
My EA Can't Open Trades From 0 Hour To 1 Hour (According to Broker)
I Changed EA Settings To Broker Current Time But My EA Can Only Open Trades From 1 Hour Or More
Can Someone Tell Me Why I Can't Trade From 0 Hour To 1 Hour And How To Fix This Problem
 
Nguyen Tuan Huynh:
I am using my ea it works in GMT+2 (Winter Time)
My EA Works Very Well And On Time ( Winter Time )
And Recently The Broker I'm Using Has Changed To Summer Time GMT +3
My EA Can't Open Trades From 0 Hour To 1 Hour (According to Broker)
I Changed EA Settings To Broker Current Time But My EA Can Only Open Trades From 1 Hour Or More
Can Someone Tell Me Why I Can't Trade From 0 Hour To 1 Hour And How To Fix This Problem

Your EA should have a section about time settings, if not, you can open a work order in the freelance section and have it fixed (if you have the source code!)

 
Nguyen Tuan Huynh: I am using my ea it works in GMT+2 (Winter Time). My EA Works Very Well And On Time ( Winter Time ). And Recently The Broker I'm Using Has Changed To Summer Time GMT +3. My EA Can't Open Trades From 0 Hour To 1 Hour (According to Broker). I Changed EA Settings To Broker Current Time But My EA Can Only Open Trades From 1 Hour Or More. Can Someone Tell Me Why I Can't Trade From 0 Hour To 1 Hour And How To Fix This Problem

You need to query the contract specification's allowed trade sessions:

SymbolInfoSessionTrade

Allows receiving time of beginning and end of the specified trading sessions for a specified symbol and day of week.

See also the following about handling time:

Forum on trading, automated trading systems and testing trading strategies

Help in coding

Fernando Carreiro, 2022.04.25 02:39

The following articles are about how to handle "time". It is for MQL5, but many of the concepts and functionality can also be applied to MQL4.

  • Dealing with Time (Part 1): The Basics for MetaTrader 5

    Functions and code snippets that simplify and clarify the handling of time, broker offset, and the changes to summer or winter time. Accurate timing may be a crucial element in trading. At the current hour, is the stock exchange in London or New York already open or not yet open, when does the ...

  • Dealing with Time (Part 2): The Functions for MetaTrader 5

    Determing the broker offset and GMT automatically. Instead of asking the support of your broker, from whom you will probably receive an insufficient answer (who would be willing to explain a missing hour), we simply look ourselves how they time their prices in the weeks of the time changes — but not ...

  • MQL5 Programming Basics: Time for MetaTrader 5

    The article focuses on standard MQL5 functions for working with time, as well as programming techniques and practically useful functions for working with time that are required when creating Expert Advisors and indicators. Particular attention is paid to the general theory of time measurement. This ...


Reason: