Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 768
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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 searched the whole forum, I could not find a way to automatically calculate the shift of arrows/icons in the indicator (when you switch the TF you need to adjust the offset), but I know that a few months ago someone posted a ready-made function
PLEASE! )))
I searched the whole forum, I could not find a way to automatically calculate the shift of arrows/icons in the indicator (when you switch the TF you need to adjust the offset), but I know that a few months ago someone posted a ready-made function
PLEASE! )))
This?
This?
cool!
ZS: One thing I don't understand is why I searched for about 20 minutes and I thought I remembered that Vitaly posted it (I searched his posts), but you found it and I didn't (((((
cool!
ZS: I don't understand one thing, why I searched for 20 minutes and remembered for sure that Vitaly posted it (I searched through his posts), but you found it and I didn't (((((
The puzzle just opens: notepad and a file called "Usefulness". What I see that might be useful to someone somewhere, and it's not trivial - I type in the link to the post and a short description. It's been like this for years... We're here to help people, not just to "look out" for order![](https://c.mql5.com/3/270/pardon.gif)
Thank you. My muscles are not enough) It is not difficult to fix the moment when the colour red changes to blue, but how to know that at this time, the blue line is covered by black, I have no idea. What condition should be added to it:-
to exclude the signal when the bar crosses the black line? In your screenshot count the last crossing upwards and do not count the crossing of the previous three bars.
It's easier, while the bars close above the EMA(21) line, they are written into one buffer (blue), below it they are written into another one (red). To exclude the signal of crossings of this line, at least two bars in a row should be closed either higher or lower.
For the code it would be as follows:
cool!
ZS: one thing I don't understand is why I searched for 20 minutes and I thought I remembered that Vitaly had posted it (I searched his posts), but you found it and I didn't (((((
But this method doesn't take into account user scrolling of the chart, that's the whole point. Put the indicator on a volatile period and then scroll into a flat period, or vice versa.
In that sense it makes more sense to rely on some ATR data to calculate distance.
If you don't want to track the chart scrolling by the user to rearrange all the arrows based on the new extreme chart prices.
Here's an example based on a fractal. Made 2 extra buffers. For a fractal, it is redundant because one can simply refer to the price of a candle. But this variant may be useful for your task.
Thank you!
yes indeed I have a much simpler task - I sign about 30 ZigZag nodes with node numbers, no text labels in the history further on
The puzzle opens simply: notepad and the file under the name "Usefulness". What I see that may be somewhere useful to someone, and it is not trivial - I put a link to the post and a short description. It's been like this for years... We're here to help people, not just to "look out" for order
persuaded, in KB usefulness to fill, not to say that I am sorry, so I do not share, just accompany their codes, I am not sure that I will, and discuss what and how already tired
ZS: of the interesting and ready, about 98%:
1 . access to ZigZag vertices as an array of structures (dynamic list and operator overloading [] ), everything seems to fly and it's very convenient that you write ZZ[2].price... ZZ[i]. up = true
2. second chart by means of MT4
out of this (1-2), is there anything interesting for the forum? - or it's like everywhere else, give us a 100% ready-made code, we won't do anything on our own ((((
Thank you!
yes indeed I have a much simpler task - I sign about 30 ZigZag nodes with node numbers, no text labels in the history further on
persuaded, in the KB usefulness to fill, not to say that I am sorry, so I do not share, just accompany their codes, I am not sure that I will, and discuss what and how already tired
ZS: of the interesting and ready, about 98%:
1 . access to ZigZag vertices as an array of structures (dynamic list and operator overloading [] ), everything seems to fly and it's very convenient that you write ZZ[2].price... ZZ[i]. up = true
2. second chart by means of MT4
out of this (1-2), is there anything interesting for the forum? - or it's like everywhere else, give us a 100% ready-made code, we won't do anything on our own ((((
Well, you can get something useful and sometimes even unusual from each code.
Codebase is designed for this very purpose, not for what two people do with it.
P.S. This gives me a good idea, I need to rewrite to an array of structures, somehow I didn't even think about it before.P.S. This gave me a good idea, I should rewrite it on the structure array too, I've never thought about it before.
The structure array is a bit simpler, but the functionality is lower, I did it through dynamic lists CList - the implementation is quite simple, but it's hard to get used to working with pointers in MQL, I'll try to finalize the code and post it in KB