Questions from Beginners MQL5 MT5 MetaTrader 5 - page 607

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
No problem. I've thrown in the algorithm. The beginning only without the graph, that is to say like this:
I need the number of the week of the month :)
I can't do it on 5 and it's not customary here on 4.
If I'm allowed, I'll write the code and post it.
what difference does it make 4 or 5 ???, the time is the same :)))
Paco, I don't know how to write on 5 and I don't see the point anymore:)
Write on 4
Probably not the right one. This is the beginning, criticism is welcome, we will do as required.
Put the EA in the tester, switch on visual mode, select TF D1, and watch the prints in the log.
Probably not the right one. This is the beginning, criticism is welcome, we will do as required.
Let's start the EA in the tester, switch on visual mode, select TF D1, and look at the prints in the log.
it does not show correctly
shows 3 weeks and today is week 4 22.08.2016
In Excel, the week=1+INT((A1-DATE(YEAR(A1+4-WEEKDAY(A1+6));1;5)+WEEKDAY(DATE(YEAR(A1+4-WEEKDAY(A1+6));1;3))/7)
We should also put in when the 1st of the month falls on a weekend, as the tester doesn't spin weekends... Didn't see about the excel.
Well, and to roll in initialization from a couple of months ago AND to the current month would not hurt, so as not to wait for the end of the calculation of the number of the week a whole month. But these are all nuances ....
That's what makes MQL4 so attractive - the code is short and clear!
We should also put in when the 1st of the month falls on a weekend, as the tester doesn't spin weekends... Didn't see about the excel.
Well, and to roll in initialization from a couple of months ago AND to the current month would not hurt, so as not to wait for the end of the calculation of the number of the week a whole month. But these are all nuances ....
That's what makes MQL4 so attractive - the code is short and clear!
Doesn't count correctly