No need to add nor change

This commit is contained in:
jackyu66git
2025-06-04 23:49:38 +08:00
parent 872eec8100
commit 8662b633ae
6 changed files with 721 additions and 1203 deletions
+1 -1
View File
@@ -323,7 +323,7 @@ def add_indicators(df):
def calculate_macd(df):
"""计算MACD指标"""
exp1 = df['close'].ewm(span=12, adjust=False).mean()
exp1 = df['close'].ewm(span=10, adjust=False).mean()
exp2 = df['close'].ewm(span=26, adjust=False).mean()
macd = exp1 - exp2
signal = macd.ewm(span=9, adjust=False).mean()
+8 -20
View File
@@ -3241,20 +3241,16 @@
console.error('主周期KLC分型时间或价格转换错误:', fx.time, fx.price);
return;
}
// 主周期 KLC
// 确定颜色和位置
const color = fx.is_bottom ? '#28a745' : '#dc3545'; // 底分型绿色,顶分型红色
// 根据强度等级调整颜色强度
let strengthColor = color;
if (fx.is_strong_fx) {
// 强分型使用更亮的颜色
strengthColor = fx.is_bottom ? '#00ff00' : '#ff0000';
}
// 构建显示文本,包含分型类型和强度信息
let displayText = `${fx.fx_strength.toFixed(1)}`;
if (fx.fx_strength < 50) { // 降低阈值让更多分型显示
if (fx.fx_strength < 1.4) { // 降低阈值让更多分型显示
displayText = fx.fx_strength >= 0.8 ? '•' : '' // 0.8以上显示点,0.8以下不显示文本
}
@@ -3265,7 +3261,7 @@
color: strengthColor,
shape: 'triangle',
text: displayText,
size: fx.is_strong_fx ? 1 : 0.6 // 调整尺寸,强分型稍大,普通分型更小
size: 2 // 调整尺寸,强分型稍大,普通分型更小
};
allMainFxMarkers.push(markerConfig);
@@ -3306,7 +3302,7 @@
return;
}
// KLU分型使用不同的颜色区分
// 主周期 KLU
const color = fx.is_bottom ? '#17a2b8' : '#fd7e14'; // 底分型用青色,顶分型用橙色
// 根据强度等级调整颜色强度
@@ -3399,12 +3395,8 @@
return;
}
// 小周期分型使用不同的颜色和样式,与主周期区分
let strengthColor = fx.is_bottom ? '#FF6B6B' : '#4ECDC4'; // 底分型用珊瑚红,顶分型用薄荷绿
if (fx.is_strong_fx) {
// 强分型使用更亮的颜色
strengthColor = fx.is_bottom ? '#FF0000' : '#00CED1';
}
// 小周期 KLC
let strengthColor = fx.is_bottom ? '#11116B' : '#222222'; // 底分型用珊瑚红,顶分型用薄荷绿
let displayText = `${fx.fx_strength.toFixed(1)}`;
// 构建小周期分型显示文本
if (fx.fx_strength < 1.5){ // 调整小周期阈值
@@ -3459,12 +3451,8 @@
return;
}
// 小周期KLU分型使用不同的颜色
// 小周期 KLU
let strengthColor = fx.is_bottom ? '#9A8C98' : '#F2CC8F'; // 底分型用灰紫色,顶分型用浅黄色
if (fx.is_strong_fx) {
// 强分型使用更亮的颜色
strengthColor = fx.is_bottom ? '#6C5B7B' : '#F9844A';
}
let displayText = `${fx.fx_strength.toFixed(1)}`;
// 构建小周期分型显示文本
if (fx.fx_strength < 1.4){ // 调整小周期阈值