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)
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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