Please edit your post and
use the code button (Alt+S) when pasting code
This makes your EA return after the first comparison, without further action.
if (Mon==False && DayOfWeek()==1) // Lets not trade on monday { //Alert("No Trading on Monday"); // Message to the trader } return(0);
Probably you wanted to have the return inside the braces.
lippmaje:
This makes your EA return after the first comparison, without further action.
Probably you wanted to have the return inside the braces.
Aha
Of course well spotted.
Thanks will give it a go.
Regards
Neil

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
Hi
I am trying to allow my EA to have the ability to trade on either Monday, Midweek (tu,we,th) or Friday. Or possibly a combination
I created 3 boolean values with midweek set as true as a default:-
Then code as follows.
If i start the EA on a Monday i get the alert no trading, however in the strategy tester it gives no results if the 3 boolean values are set in any configuration.
I obviously have made a fundamental error. Can anyone point me in the right direction please?
Thanks
Neil