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
Hello,
I found a simple solution with OnTimer routine. Let's see the MQL code:
Hope this will help you.
Massimo
If it was working ( it doesn't as prevTimeCurrent is never updated)
This will only tell you that there have been no ticks for 5 seconds.
Yes. I know it. But I need trading more markets at the same time and ALL MARKETS MUST BE OPEN (gold, oil, S&P, fx)
It will not tell you if any particular market is open.
I find solution for me: MarketInfo(Symbol(), MODE_TRADEALLOWED);
return 1 - if market open else return 0
Thank You for share the solution.
MQL4 Code:
You can also analyze the error when your ordersend call fails.
Hi,
How can I find market Open or Close?
dunction GetLastError()? What value return function? Or other function/way? Other solution?
Thank you.
You can to use this reference... to check day by day the time to beggin and time to end the market session.
//Test for Friday after 5pm EST
Time zone - Trading Systems - MQL5 programming forum #2 (2020.11.13)
Time zone - Trading Systems - MQL5 programming forum #2 (2020.11.13)
Time zone - Trading Systems - MQL5 programming forum #2 (2020.11.13)
what about an ea that uses OnTimer to do it's duty?
why there is no library in mql to check for it?
Your EA will only work if the market is open. How can something that is not receiving ticks to enable processing carry out any checks???