From bb903a11cf7d64444c2817bc96c4e14e9fe11344 Mon Sep 17 00:00:00 2001 From: Porter Date: Thu, 28 Aug 2025 11:09:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9web=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChanEnum.py | 7 +++++-- web/templates/index.html | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChanEnum.py b/ChanEnum.py index cc6de9c..8a542a7 100644 --- a/ChanEnum.py +++ b/ChanEnum.py @@ -82,8 +82,11 @@ class Chan_MACD_STATE(Enum): CROSS0_DOWN = auto() # 向下穿越零轴 # 趋势状态 - NEAR0 = auto() # 接近零轴 - + NEAR0 = auto() + NEAR0_1 = auto() # 价格在EMA52附近/价格接触EMA52并马上离开,需要观察离开强度 + NEAR0_2 = auto() # MACD白线接近零轴,价格未到EMA52 + NEAR0_3 = auto() # MACD白线接近零轴和价格接触或短暂击穿EMA52,而MACD黄线不穿零轴 + NEAR0_4 = auto() # MACD黄白线接近零轴和价格在EMA24附近 # 位置状态 HIGH = auto() # 高位:MACD黄白线离开零轴到高点,能量柱最大开始减弱 HIGH_EMPTY = auto() # 高位空:MACD黄白线处于高位,能量柱衰减,与黄白线形成空间夹角 diff --git a/web/templates/index.html b/web/templates/index.html index d43e5d3..f35e277 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -5446,10 +5446,10 @@ // 添加默认EMA配置 const defaultEMAs = [ - { type: 'EMA', length: 5, color: '#FF0000', name: 'EMA5' }, // 红色 - { type: 'EMA', length: 10, color: '#0000FF', name: 'EMA10' }, // 蓝色 - { type: 'EMA', length: 26, color: '#008000', name: 'EMA26' }, // 深绿色 - { type: 'EMA', length: 52, color: '#800080', name: 'EMA52' } // 紫色 + { type: 'EMA', length: 6, color: '#FF0000', name: 'EMA6' }, // 红色 + { type: 'EMA', length: 13, color: '#0000FF', name: 'EMA13' }, // 蓝色 + { type: 'EMA', length: 24, color: '#008000', name: 'EMA24' }, // 深绿色 + { type: 'EMA', length: 52, color: '#800080', name: 'EMA52' } // 紫色 ]; defaultEMAs.forEach(ema => { @@ -5463,7 +5463,7 @@ lineWidth: 1, // 1px线宽 lineStyle: 0, // 实线 color: ema.color, - visible: true + visible: (ema.length === 24 || ema.length === 52) }; movingAverages.push(config);