提交 a0a1856a 编写于 作者: Z zengbin93

0.5.1: fix bug

上级 7d204483
......@@ -22,8 +22,7 @@ def plot_kline(ka, bs=None, file_html="kline.html", width="1400px", height="680p
:param height: str
:return: None
"""
df = pd.DataFrame(ka.kline)
df = macd(df)
df = ka.to_df(use_macd=True, ma_params=(5, 20,))
x = df.dt.to_list()
title = "%s | %s 至 %s" % (ka.symbol, ka.start_dt, ka.end_dt)
kline = (
......@@ -265,7 +264,7 @@ def plot_kline(ka, bs=None, file_html="kline.html", width="1400px", height="680p
def plot_ka(ka, file_image, mav=(5, 20, 120, 250), max_k_count=1000, dpi=50):
"""绘制 ka,保存到 file_image"""
df = pd.DataFrame(ka.kline)
df = ka.to_df(use_macd=True, ma_params=(5, 20,))
df.rename({"open": "Open", "close": "Close", "high": "High",
"low": "Low", "vol": "Volume"}, axis=1, inplace=True)
df.index = pd.to_datetime(df['dt'])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册