Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1897
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 did it, it works.
---
Something tells me you can do without the cycle.
Is this true?
There seems to be no shift function in MQL, as far as I know. So, the shift can only be done with the help of a loop. Why doesn't it suit you?
P.S. About the extra array, it was not necessary. You correctly made the shift and write the bid value right in the buffer!
Good afternoon .
I am displaying the value of the daily fractal in the form of its value or a vertical line. The line is not displayed and the value is 0.
Here is a piece of code
Please tell me what's wrong.
Why are you sure the fractal on the zero bar must be non-zero? When, it won't be 0 only if it is there!
Because the value is 0. The fractal is formed after n candles
And this also happens farfrom always. Only in case if the n-th bar is a fractal!
Meaning, to see the last ticks on an open chart :)
P.S. * Change of Ask and Bid
As in Market Watch
I was thinking speed measures)))
Meaning, to see the last ticks on an open chart :)
P.S. * Change of Ask and Bid
As in Market Watch
ArrayCopy() is not a good solution?
ArrayCopy, this is for copying from one array to another. And here you need to shift the values before adding each tick. Therefore, it can only be solved by using a loop.
ArrayCopy() does not suit you?
How to use this, can you show me?
Here's the task.
Forum on trading, automated trading systems & strategy testing
Any questions from newbies on MQL4 and MQL5, help and discussion of algorithms and codes
Vitaly Muzichenko, 2022.02.13 15:42
I don't need an array for the entire available history.
I literally need 50-100 bars
Like this
Here is the ready code, but the loop is a bit scary
---
Again, there is a loop inside ArrayCopy() and probably more than one. So the code will hardly become lighter and faster due to this replacement
Why do you first record the data and then shift it?
This does not correspond to the actual tick chart!
This is the right way to do it.
Again, there is a loop inside ArrayCopy() and probably more than one. So the code will hardly become simpler and faster due to this replacement.
I've already said it many times above: you cannot do without a loop!
Why do you first record the data and then shift it?
This does not correspond to the actual tick chart!
This is the right way to do it.
kasher of course, but the same).
Yes, and a short cycle of up to 1000 iterations with a couple of assignment comparisons is easy. so it shouldn't be daunting.
A fractal is formed if there is no new extremum and after three bars those 0, 1, 2.
Nothing has changed.
Or something is wrong again