我想在我的图表上绘制信号有没有办法在烛台上做到这一点?我做了以下事情并卡住了:(
!pip install yfinance
!pip install mplfinance
import yfinance as yf
import mplfinance as mpf
import numpy as np
import pandas as pd
df=yf.download('BTC-USD',start='2008-01-04',end='2021-06-3',interval='1d')
buy=np.where((df['Close'] > df['Open']) & (df['Close'].shift(1) < df['Open'].shift(1),1,0)
fig = plt.figure(figsize = (20,10))
mpf.plot(df,figsize=(20,12),type ='candle',volume=True);
# any idea how to add the signal?