- Time Filter EA Trade
- Is there any Online chat support?
- Timestamp with milliseconds
Is there anyone here who has an EA type mq4, which has a timing setting. I want my EA to open positions at certain times, but have no timing setting. I want to ask for help from those of you who have an EA type mq4, just copy the timing settings, I'll insert them into my EA. Thank you for the help. ***
bool IsTimeOK = false; if ( StartH > EndH ) { if ( Hour() >= StartH || Hour() < EndH ) IsTimeOK = True; } else { if ( Hour() >= StartH && Hour() < EndH ) IsTimeOK = True; } if (IsTimeOK ) { // you can trade here }
- JONI Spd: I want my EA to open positions at certain times, but have no timing setting. I want to ask for help …
Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
No free help 2017.04.21Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum 2018.05.12 -
#define HR0900 32400 #define HR2030 73800 // (20*60+30)*30 datetime now = time(); bool isTimeOk = HR0900 <= now && now < HR2030;
Find bar of the same time one day ago - MQL4 programming forum 2017.10.06Variations on a theme.
Is there anyone here who has an EA type mq4, which has a timing setting. I want my EA to open positions at certain times, but have no timing setting. I want to ask for help from those of you who have an EA type mq4, just copy the timing settings, I'll insert them into my EA. Thank you for the help. ***
Hi JONI Spd, my five cents for MT4 would be to suggest you add this line in the ON INIT section of your EA:
EventSetTimer(60); // if you want to check every 60 seconds
Then add the below section, and code inside whatever you want to do every 60 seconds, or the frequency you setup above:
void OnTimer()
{
}
Hi JONI Spd, my five cents for MT4 would be to suggest you add this line in the ON INIT section of your EA:
EventSetTimer(60); // if you want to check every 60 seconds
Then add the below section, and code inside whatever you want to do every 60 seconds, or the frequency you setup above:
void OnTimer()
{
}
It seems that the OP wants to trade only at certain times of the day.
IF that is so, how will using the timer help?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use