Max and Min shadow price in range 5

 

I have to get the maximum and minimum of a series of candles (hour candles) in a certain range, exactly from 5 to the left, a middle one (the one that must be the maximum or the minimum) and 5 to the right

I found iHighest but from what I understand it allows you to get the maximum only backwards, and not to be sure that there are at least 5 candles both on one side and on the other are smaller or larger than the pivot

What I need is a function that returns this value

 
Samuele Quaresima: I have to get the maximum and minimum of a series of candles (hour candles) in a certain range, exactly from 5 to the left, a middle one (the one that must be the maximum or the minimum) and 5 to the right. I found iHighest but from what I understand it allows you to get the maximum only backwards, and not to be sure that there are at least 5 candles both on one side and on the other are smaller or larger than the pivot.What I need is a function that returns this value
You seem to be describing a fractal with a shoulder size of 5. There is no such function, so you will have to code your own. Collect the necessary bars and then loop over them as you keep track of the maximum or minimum and the position.
 
Samuele Quaresima :

I have to get the maximum and minimum of a series of candles (hour candles) in a certain range, exactly from 5 to the left, a middle one (the one that must be the maximum or the minimum) and 5 to the right

I found iHighest but from what I understand it allows you to get the maximum only backwards, and not to be sure that there are at least 5 candles both on one side and on the other are smaller or larger than the pivot

What I need is a function that returns this value

Examples of indicators:

High and Low Magnet
High and Low Magnet
  • www.mql5.com
Индикатор перемещает любой прямоугольник на High и Low
 
Fernando Carreiro #:
You seem to be describing a fractal with a shoulder size of 5. There is no such function, so you will have to code your own. Collect the necessary bars and then loop over them as you keep track of the maximum or minimum and the position.
Vladimir Karputov #:

Examples of indicators:

Thank you, fractals is exactly what I was searching for

 
Samuele Quaresima: exactly from 5 to the left, a middle one (the one that must be the maximum or the minimum) and 5 to the right
Samuele Quaresima #: Thank you, fractals is exactly what I was searching for

That isn't what you asked for. Fractal indicator is two left, the middle, and two right. Not five.

For five, search the codebase for AsymmetricFractals indicator.