@kamuira/stock-analyzer 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.html +9 -9
  2. package/package.json +1 -1
package/index.html CHANGED
@@ -397,6 +397,15 @@
397
397
  <div class="signal-advice">${summary.advice}</div>
398
398
  </div>`;
399
399
 
400
+ // 评分条(紧贴信号卡片下方,可视化综合评分)
401
+ const barColor = summary.totalScore >= 5 ? '#4caf50' : summary.totalScore >= 0 ? '#ff9800' : '#f44336';
402
+ html += `<div class="score-bar-container">
403
+ <div class="score-bar">
404
+ <div class="score-bar-fill" style="width:${summary.normalizedScore}%; background:${barColor}"></div>
405
+ </div>
406
+ <div class="score-labels"><span>强烈卖出</span><span>观望</span><span>强烈买入</span></div>
407
+ </div>`;
408
+
400
409
  // 操作建议大卡片(最显眼)
401
410
  const posAdvice = (rr && rr.positionAdvice) || '';
402
411
  const holdAdvice = summary.totalScore >= 10 ? '建议持仓5-10天,趋势跟踪' : summary.totalScore >= 5 ? '建议持仓3-5天,短线波段' : summary.totalScore >= 1 ? '建议持仓1-3天,快进快出' : '不建议开仓';
@@ -450,15 +459,6 @@
450
459
  </div>` : ''}
451
460
  </div>`;
452
461
 
453
- // 评分条
454
- const barColor = summary.totalScore >= 5 ? '#4caf50' : summary.totalScore >= 0 ? '#ff9800' : '#f44336';
455
- html += `<div class="score-bar-container">
456
- <div class="score-bar">
457
- <div class="score-bar-fill" style="width:${summary.normalizedScore}%; background:${barColor}"></div>
458
- </div>
459
- <div class="score-labels"><span>强烈卖出</span><span>观望</span><span>强烈买入</span></div>
460
- </div>`;
461
-
462
462
  // 大盘环境
463
463
  if (marketEnv && marketEnv.signals) {
464
464
  html += `<div style="background:#1a2530;border:1px solid #2a3a4a;border-radius:8px;padding:12px 16px;margin-bottom:16px;font-size:13px;color:#aaa">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kamuira/stock-analyzer",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "preferGlobal": true,
5
5
  "description": "A股/台股综合技术分析工具 - 支持实时分析、回测验证、买卖建议",
6
6
  "main": "server.js",