search the BNBUSDT chart for any maximum and minimum to determine the maximum and minimum of a Japanese candle that is in the extreme, and plot Fibonacci levels from 0 to 1 on the extreme candle, where 0 should be at the extreme.
def fibonacci_retracements(chart, days): high = chart.iloc[-1]['high'] low = chart.iloc[-1]['low'] if days > 5: high = chart.iloc[-days:-1]['high'].max() low = chart.iloc[-days:-1]['low'].min() print(high, low) fibs = [] for i in range(0,11): fibs.append(low + (high-low)*i/10) return fibs fibs = fibonacci_retracements(chart, 10) fibs