Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 272
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
I am trying to reproduce the method suggested by you - where am I wrong?
We must understand that real trading has its pitfalls. From the point of view of mathematics and simple human logic, everything is beautiful.
But all will be enough just a glitch in the form of the appearance of one candle (which may then be erased) option not working ...
You have to understand that real trading has its pitfalls. From the point of view of mathematics and simple human logic, everything is beautiful of course .
But all it will take is a glitch in the form of one candle (which may be wiped up later) and it's not working.
Just do not see the expected beauty ...
As for the glitches - everything cannot be foreseen - with the appearance of unplanned situations, an additional solution is sought - for the future.
I am trying to reproduce the method you suggested - where am I wrong?
I did not understand the second half of the table.
The first half, as I understand it, assumes that the month started on Monday. Accordingly, all days from 1 to 7 inclusive are the first week, then everything makes sense. But we do not consider what week the specified number, but what Monday or Thursday in the month, the first or second or third. Suppose the 7th day is Wednesday, before that was another Wednesday in this month? No, so it is the first Wednesday of the month.
Then add that it's not a bad idea to know trigonometry and drafting.
You can disagree with me and know nothing, but then you'll have to ask for help for every sneeze. And the willingness to help will dwindle with each such response to a hint. One less willing to help.
I did not understand the second half of the table.
The first half, as I understand it, assumes that the month started on Monday. Accordingly all days from 1 to 7 inclusive the first week, then everything is logical. But we do not consider what week the specified number, but what Monday or Thursday in the month, the first or second or third. Suppose the 7th is Wednesday, before that was another Wednesday in this month? No, so it is the first Wednesday of the month.
Earlier you suggested dividing the date of the month by 7 and rounding, which is done in the second table.
I don't understand your algorithm.
Now here is what I am thinking:
1. Determine the day of the week of the first day of the month.
2. Find out how many days left to the end of the week (was Wednesday (3) to Monday 7-3 = 4).
3. The 5th day - the beginning of the second week
4. then in the loop, we are looking for a week, if the number falls within the range of 5 + 7 * x to 5 + 7 * (x +1), where x - number of week minus one, then we have found the week
But it's a bit complicated, maybe there's an easier way?
This isn't a maths class, is it, or am I writing in the wrong place?
This is about programming and logic, not about handing out ready-made solutions.
I don't think anyone asked you to do anything... We are discussing a topic...
here is the answer https://www.mql5.com/ru/forum/110372
I don't think anybody asked you to do anything. We're discussing a topic.
I don't think anybody asked you to do anything. We're discussing a topic.
You are absolutely sure that I have not given you the answer already?
Artyom, ban him for a week and you'll be right.