提交 f402ff12 编写于 作者: Z zengbin93

修复第一、二买卖点识别


Former-commit-id: e17ba065aa6a681626e359c872668684409ee702
上级 29c08687
......@@ -3,7 +3,7 @@
from .analyze import KlineAnalyze, SolidAnalyze
__version__ = "0.2.2"
__version__ = "0.2.3"
__author__ = "zengbin93"
__email__ = "zeng_bin8888@163.com"
......
......@@ -552,7 +552,7 @@ class SolidAnalyze:
}
if isinstance(ka1, KlineAnalyze) and ka1.xd[-1]['fx_mark'] == 'g':
# 以上一级别线段终点为走势分解的起点
xds = [x for x in ka.xd if x['dt'] <= ka1.xd[-1]['dt']]
xds = [x for x in ka.xd if x['dt'] >= ka1.xd[-1]['dt']]
# 盘整至少有三段次级别走势,趋势至少有5段;底背驰一定要创新低
if xds[-1]['fx_mark'] == 'd' and len(xds) >= 4 and xds[-1]['xd'] < xds[-3]['xd']:
zs1 = [xds[-2]['dt'], xds[-1]['dt']]
......@@ -587,7 +587,7 @@ class SolidAnalyze:
}
if isinstance(ka1, KlineAnalyze) and ka1.xd[-1]['fx_mark'] == 'd':
# 以上一级别线段终点为走势分解的起点
xds = [x for x in ka.xd if x['dt'] <= ka1.xd[-1]['dt']]
xds = [x for x in ka.xd if x['dt'] >= ka1.xd[-1]['dt']]
# 盘整至少有三段次级别走势,趋势至少有5段;顶背驰一定要创新高
if xds[-1]['fx_mark'] == 'g' and len(xds) >= 4 and xds[-1]['xd'] > xds[-3]['xd']:
zs1 = [xds[-2]['dt'], xds[-1]['dt']]
......@@ -622,7 +622,7 @@ class SolidAnalyze:
}
if isinstance(ka1, KlineAnalyze) and ka1.xd[-1]['fx_mark'] == 'd':
# 以上一级别线段终点为走势分解的起点
xds = [x for x in ka.xd if x['dt'] <= ka1.xd[-1]['dt']]
xds = [x for x in ka.xd if x['dt'] >= ka1.xd[-1]['dt']]
# 次级别向下走势不创新低,就认为是类二买,其中第一个是真正的二买;
# 如果一个向上走势内部已经有5段次级别走势,则认为该走势随后不再有二买机会
if xds[-1]['fx_mark'] == 'd' and len(xds) <= 5 and xds[-1]['xd'] > xds[-3]['xd']:
......@@ -655,7 +655,7 @@ class SolidAnalyze:
}
if isinstance(ka1, KlineAnalyze) and ka1.xd[-1]['fx_mark'] == 'g':
# 以上一级别线段终点为走势分解的起点
xds = [x for x in ka.xd if x['dt'] <= ka1.xd[-1]['dt']]
xds = [x for x in ka.xd if x['dt'] >= ka1.xd[-1]['dt']]
# 次级别向上走势不创新高,就认为是类二卖,其中第一个是真正的二卖;
# 如果一个向下走势内部已经有5段次级别走势,则认为该走势随后不再有二卖机会
if xds[-1]['fx_mark'] == 'g' and len(xds) <= 5 and xds[-1]['xd'] < xds[-3]['xd']:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册