提交 54902430 编写于 作者: Z zengbin93

0.5.1: 新增Bar对象,为实时分析提供便利

上级 d22d53e9
......@@ -10,6 +10,10 @@ from czsc.analyze_v2 import KlineAnalyze
warnings.warn(f"czsc version is {czsc.__version__}")
df = get_kline(ts_code="000001.SH", end_dt="2020-07-14 15:00:00", freq='D', asset='I')
ka = KlineAnalyze(df, name="日线")
df = get_kline(ts_code="000001.SH", end_dt="2020-07-15 15:00:00", freq='D', asset='I')
split_dt = "2020-07-01 15:00:00"
ka = KlineAnalyze(df[df.dt <= split_dt], name="日线")
print(ka)
bars = df[df.dt > split_dt].to_dict("records")
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册