Hello,
can someone please tell me the code for a new high / Low of an indicator.
For understanding see attached picture.
Thank you so much.
Just remember the previous high/low value and compare it to current
Hi Navdeep Singh,
thanks for your comment
I do not understand the logic how I set the new low, because the next low must not be a new low. And when I have to set a low value to "empty" ? because a some point new low cant go deeper ...........
I tried a lot of codes, but it doesn work as I want.
Please can you help ?
2 of my examples:
***
Hi Navdeep Singh,
thanks for your comment
I do not understand the logic how I set the new low, because the next low must not be a new low. And when I have to set a low value to "empty" ? because a some point new low cant go deeper ...........
I tried a lot of codes, but it doesn work as I want.
Please can you help ?
2 of my examples:
***
![Code Code](https://c.mql5.com/3/357/Code.png)
You could try using array functions (ArrayMaximum and ArrayMinimum). That is one way to achieve index of the last highest lowest values for n period
![Array Functions - MQL4 Reference Array Functions - MQL4 Reference](https://c.mql5.com/36/51/array-functions-mql4-reference.png)
![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,
can someone please tell me the code for a new high / Low of an indicator.
For understanding see attached picture.
Thank you so much.