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 fibo(t): n = len(t) return [t[int(n) * i] for i in fibonacci_sequence(1)][1:] #detect max and min max_in_range = max(df['High'].iloc[int(start):int(end)]) min_in_range = min(df['Low'].iloc[int(start):int(end)]) #determine max and min indices max_index = df[df['High'] == max_in_range].index[0] min_index = df[df['Low'] == min_in_range].index[0] #plot fibo start, end = max_index, min_index trace(df['Close'].iloc[int(start):int(end)], fibo(df['Close'].iloc[int(start):int(end)]))