![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
There is a situation very specific for BM&F Bovespa (Brazilian market). During US daylight savings, market hours change +1 hour (I will not get into the reason). My EA must end profitable positions during the last 10 minutes of market run (in fact, before closing auction starts). Now it is hard coded:
I am trying to make this more reliable and soft coded. Even when I run a back-test, this hard code will not be last 10 minutes if US daylight is going on. Can lead to wrong conclusions.
Using SymbolInfoSessionTrade() is always returning 1970.01.01 00:00, which I believe is because of trade session hours for symbol:
I was thinking of getting the closing time of previous day, but this will lead to wrong time on 2 days per year.
Any idea?
Thanks in advance.