I would love to Add a Timefilter to an EA so that when I am not home I don't risk losing my account. I don't wanna trade during NY session
// MQL5
MqlDateTime mTime;
input int t_start = 8; //Start
input int t_end = 17; //End
bool time_filter() {
bool hour_limit = true;
if(mTime.hour >= t_start && mTime.hour <= t_end) hour_limit=false;
return(hour_limit);
}
Thank you very much! I really appreciate it. And thank you to the other persons for respondinghere the code:
Code:// MQL5 MqlDateTime mTime; input int t_start = 8; //Start input int t_end = 17; //End bool time_filter() { bool hour_limit = true; if(mTime.hour >= t_start && mTime.hour <= t_end) hour_limit=false; return(hour_limit); }
Thank you for the information.here the code:
Code:// MQL5 MqlDateTime mTime; input int t_start = 8; //Start input int t_end = 17; //End bool time_filter() { bool hour_limit = true; if(mTime.hour >= t_start && mTime.hour <= t_end) hour_limit=false; return(hour_limit); }
You could always get someone to program your manual strategy for you or look for EA's that are a good fit for you, and that way you dont have to be at the computer all the time.Programing language is very complicated for me
It is the reason I like manual trading.
I would love to Add a Timefilter to an EA so that when I am not home I don't risk losing my account.