Millenium

Generation

generate functionMon, 10 Apr 2023

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(data): min = data[data['low'] == min(data['low'])] max = data[data['high'] == max(data['high'])] # fibonacci fib = [0, 0.236, 0.382, 0.5, 0.618, 0.786, 1] for i in fib: plt.axhline(min['low'].values[0] + ((max['high'].values[0] - min['low'].values[0]) * i), linestyle='--', c='r') plt.plot(data['close']) plt.show()

Questions about programming?Chat with your personal AI assistant