hi guys
somebody know if it's possible to introduce a time working in each EA ?? for example.....if i want to work only beetwen 7:00 am and 5:00 pm ......
i have tried with some varables but it doesnt work .
can you help me please??
thanksssssssssssss
Giulio
Yes, it's possible.
For example:
if((Hour()<7)&&(Hour()>=17)) return;
else
{
// EA working here
}
i have tried but in this way i cant test my EA becasue the program read the time . i would trade only in some hours ( for example 8 am - 5 pm ) probably as you said me the program works correctly only in these hours but i cant test what can i do ??
Place int start() {
if (UseHourTrade){
if((Hour()>=FromHourTrade)&&(Hour()<=ToHourTrade))
Comment("Trading Hours");
else
{
Comment("Non-trading Hours");
return(0);
}
}
Place int start() {
if (UseHourTrade){
if((Hour()>=FromHourTrade)&&(Hour()<=ToHourTrade))
Comment("Trading Hours");
else
{
Comment("Non-trading Hours");
return(0);
}
}
this works on 24hr clock
extern string PARAMETERS_FILTER = "PARAMETERS FILTER";
extern bool UseHourTrade = false;
extern int FromHourTrade = 8;
extern int ToHourTrade = 18;
Strange this is how i have this set up on my EA
//+------------------------------------------------------------------+ //| Start function | //+------------------------------------------------------------------+ void start() { if (UseHourTrade){ if((Hour()>=FromHourTrade)&&(Hour()<=ToHourTrade)) Comment("Trading Hours"); else { Comment("Non-trading Hours"); return(0); } }
- 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 guys
somebody know if it's possible to introduce a time working in each EA ?? for example.....if i want to work only beetwen 7:00 am and 5:00 pm ......
i have tried with some varables but it doesnt work .
can you help me please??
thanksssssssssssss
Giulio