Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 203
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
Well... I don't think we need to dig that deep, but the request in a loop is really the first thing that catches your eye.
What if it needs this data one time, or once an hour? Why make a useless loop?
None of us, except for the questioner himself, know what he wants. So we can only advise what he was advised to do - to go and read in a telepathic club his failings in formulating the question. And do not be offended by those who decided to laugh a little.
Trollers:) A better suggestion would be to get the prices in a loop. Accordingly, store in arrays.
In my opinion, it is simpler like this
Alert outputs immediately to the screen. This is the end of the table
Have you read the question? You seem to have missed it.
You should have just answered that my question was not clear to you. And you "salt, pepper..." Offensive
Read my first reply to you, it was a question to you. If you had answered it clearly, it might have been a different conversation.
What kind of signals were you asking about?
What does this have to do with candle data?
how to put it in a loop to display not just one day but the history, all twisted like a snake does not work, the interest is technical, I'm itching))
Please advise how to get a correct and more accurate price for where the two machines intersect
The intersection is between the bars, and the calculation is based on the bars. Or do you need to be more precise? You can interpolate, but do you have to? The slow Ma has the same value.
Intersection between bars, and the calculation is done on a bar-by-bar basis. Or do you need to be more precise? You could interpolate, but should you? Slow Ma has the same value.
MA crossing occurs between bars - caught a clear example
The MA on the bars to the left and right of the crossing is different from the price at the crossing point. I understand that the questioner wants the value at the exact crossing point instead of the value on one of the adjacent bars. This exact value can be obtained using linear interpolation - because the MA between bars is constructed as straight line segments. Or take the coordinates of each MA on the adjacent bars. Construct analytically 2 straight lines and calculate their intersection point. It is possible to calculate by considering 2 similar triangles. A counter question arises - why do we need it? Are the costs commensurate with the value of the result? After all, the intersection points will move if the MA parameters are changed minimally. Most likely, it is required by the head of the course project