dalidyh: On the monday I want it to plus one onto "int week" then when "week" gets 5 it - 4 so its back at week one.
|
|
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
Hey guys,
So I made an EA and in the code it counted the weeks it was all working well but then I saved over the EA accidentally with an earlier version and I can't seem to figure out how I coded the week counter so I'm in need of some help.
On the monday I want it to plus one onto "int week" then when "week" gets 5 it - 4 so its back at week one.
Some code off the top of my head how I think it should look like.
Thanks for the help I'm just getting into this.
extern int tradeweek = x
int week = 1
if(DayOfWeek() == 1)
{
for(week >4; week++)
{
Alert("Week " + week);
if(week == 5)
{
week - 4;
Alert("Week " + week);
}
}
}
if(week == tradeweek)
//Continue EA