diff --git a/czsc/cobra/utils.py b/czsc/cobra/utils.py index dd0cd3ba8d5c358d6cffd67875d899a0485ceb93..6ca727a4ddcfd29b14024c1c4e47339521b5f567 100644 --- a/czsc/cobra/utils.py +++ b/czsc/cobra/utils.py @@ -61,6 +61,7 @@ def kdj_gold_cross(kline: Union[List[dict], pd.DataFrame], just: bool = True): traceback.print_exc() return False + def kdj_dead_cross(kline: Union[List[dict], pd.DataFrame], just: bool = True): """输入K线,判断KDJ是否死叉 diff --git a/czsc/plot.py b/czsc/plot.py index 506b3f08b29593dc4cd15bdc379a6433b931b250..a76f11c2b40c2ce532d6878dd54dbe5b189f72b4 100644 --- a/czsc/plot.py +++ b/czsc/plot.py @@ -4,11 +4,10 @@ """ -from pyecharts.options import HeatMapItem from pyecharts import options as opts from pyecharts.charts import HeatMap, Kline, Line, Bar, Scatter, Grid from pyecharts.commons.utils import JsCode -from typing import List, Callable +from typing import List def heat_map(data: List[dict], @@ -33,7 +32,7 @@ def heat_map(data: List[dict], :return: 图表 """ - value = [HeatMapItem(value=[s['x'], s['y'], s['heat']]) for s in data] + value = [opts.HeatMapItem(value=[s['x'], s['y'], s['heat']]) for s in data] heat = [s['heat'] for s in data] if not x_label: