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 draw_Fibonacci_line(df, interval, candlestick_interval): df['H-L'] = df['High'] - df['Low'] df['H-PC'] = abs(df['High'] - df['Adj Close'].shift(1)) df['L-PC'] = abs(df['Low'] - df['Adj Close'].shift(1)) df['TR'] = df[['H-L', 'H-PC', 'L-PC']].max(axis=1) df['ATR'] = df['TR'].rolling(interval).mean() df['Fibb_0'] = 0 df['Fibb_0.236'] = df['ATR']*0.236 df['Fibb_0.382'] = df['ATR']*0.382 df['Fibb_0.5'] = df['ATR']*0.5 df['Fibb_0.618'] = df['ATR']*0.618 df['F