Hello friends,
I am searching for an algorithm that calculates the previous 2 minimum and maximum with the Fibonacci retracements.
Imagine having the maximum and the minimum of the 15 firsts minutes of the day.
From that point, the algorithm has to find whether a maximum or a minimum can be considered as a new minimum or new maximum.
A new maximum is found if:
-The current value is higher than the previous maximum
-In a downtrend followed by a small uptrend then by another downtrend, imagine having:
point(1) previous maximum(beginning of the first downtrend),
point(2) previous “minimum” (end of the first downtrend)
point(3) current previous hypothetic maximum (beginning of the second downtrend)
point(4) current price
Fibonacci retracement based on points 1 and 2.
The condition for point 3 to be a maximum is that: Fibonacci retracement level 0.382<point(3)<Fibonacci retracement level 0.681 and point(4)<Fibonacci retracement level 0.382
Of course, it has to work in the exact opposite way in an uptrend.
I would be very grateful if someone can help figure this out. I am open for others explanation
Thank you guys in advance
Pietro