![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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'm struggling with the following problem :
I'm trying to program an EA to be able to know which week we are in (value of 1 to 52) and to set a maximal risk for the week based on the equity at the start of the week. Since there is no functions in MQL4 allowing me to do that, I don't know how to start.
Should I get the DayOfWeek (0 - 6) and the date or use the DayOfYear + simple math to determine what week is (ex : day 130 / 7 = week 18th)
I'm open to new ideas.
Thanks