So the problem is, when the market close during early morning on my timezone, which is around 5 a.m, the ea keep sleep during that time until it open back using the setting above.. which is 00:01
But my setting is almost 24 hours run right.. so what is the issue here ??
Read the Documentation! Everything is explained there, and you'll find the answer you need.
- docs.mql4.com
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Hi want to ask, i'm using time filter to trade on mt4.. Here is the code related to it
So the problem is, when the market close during early morning on my timezone, which is around 5 a.m, the ea keep sleep during that time until it open back using the setting above.. which is 00:01
But my setting is almost 24 hours run right.. so what is the issue here ??
what do you mean by market close ?
if the market closes then its not tradable
you can check the trading sessions with this
SymbolInfoSessionTrade - Market Info - MQL4 Reference
- docs.mql4.com
what do you mean by market close ?
if the market closes then its not tradable
you can check the trading sessions with this
SymbolInfoSessionTrade - Market Info - MQL4 Referenceduring early morning, market closed, then the price start moving back..
Yes, that is normal. So what is the issue?
Only start trading once the market has opened again.
As @Lorentzos Roussos explained, use the function SymbolInfoSessionTrade to find out the time of the market sessions.
Yes, that is normal. So what is the issue?
Only start trading once the market has opened again.
As @Lorentzos Roussos explained, use the function SymbolInfoSessionTrade to find out the time of the market sessions.
the issue is, during that time my ea on sleep mode. no trade at all.. it open on vps time on 00:01. on my timezone, it close during 5 am. and reopen back on 4 p.m.. how many hours were wasted.. almost 11 hours.. Not sure is this related to vps 12 hours since my setting is 24 hours..
Is that not obvious? If the market is closed, then no trade operations are allowed. Also, no new ticks arrive so the the EA has no need to do anything.
Once the market opens and the new ticks start arriving, then take action.
Don't make your code logic depend on an exact starting time. Make it so that it detects the first tick arrives after the start time you have set, and only then place your trades.
Is that not obvious? If the market is closed, then no trade operations are allowed. Also, no new ticks arrive so the the EA has no need to do anything.
Once the market opens and the new ticks start arriving, then take action.
Don't make your code logic depend on an exact starting time. Make it so that it detects the first tick arrives after the start time you have set, and only then place your trades.
most broker reopen after a few minute..
Brokers can use different time-zones. Don't just assume that it is the same time-zone as your VPS or your computer.
Adjust your start and end times based on the trade server's time zone.
An I repeat, use the SymbolInfoSessionTrade to find out the session times and adjust accordingly. Don't just hard-code the start and end times.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi want to ask, i'm using time filter to trade on mt4.. Here is the code related to it
So the problem is, when the market close during early morning on my timezone, which is around 5 a.m, the ea keep sleep during that time until it open back using the setting above.. which is 00:01
But my setting is almost 24 hours run right.. so what is the issue here ??