Hello everyone,
I'm a newbie to MQL5 and I've tried to search on this forum but couldn't find a solution for my problem.
I'm coding an indicator which is used for my EA. The main purpose of this indicator is counting the number of bars of each peak or trough (in other words, it forms the highest or lowest in how many bars). If this number is between a range (Eg. 10-15), it will be shown at the top/bottom of the highest/lowest candle (as in the picture).
I hope an experienced programmer can help!
Hi, just a thought, you might want to look at using the ZigZag indicator via iCustom. With that, you could count the difference between the highs and lows, depending on the values you use to "drive" the ZigZag.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone,
I'm a newbie to MQL5 and I've tried to search on this forum but couldn't find a solution for my problem.
I'm coding an indicator which is used for my EA. The main purpose of this indicator is counting the number of bars of each peak or trough (in other words, it forms the highest or lowest in how many bars). If this number is between a range (Eg. 10-15), it will be shown at the top/bottom of the highest/lowest candle (as in the picture).
I hope an experienced programmer can help!