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:
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.
Thank you, fractals is exactly what I was searching for
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.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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