diff --git a/frontend/app/signals/page.tsx b/frontend/app/signals/page.tsx index cf0b4a7..a4d56d2 100644 --- a/frontend/app/signals/page.tsx +++ b/frontend/app/signals/page.tsx @@ -84,14 +84,12 @@ function pct(v: number, digits = 1): string { function LayerScore({ label, score, max, colorClass }: { label: string; score: number; max: number; colorClass: string }) { const ratio = Math.max(0, Math.min((score / max) * 100, 100)); return ( -
-
- {label} - {score}/{max} -
-
+
+ {label} +
+ {score}/{max}
); } @@ -137,26 +135,22 @@ function MarketIndicatorsCards({ symbol }: { symbol: Symbol }) { const premium = Number(premVal?.premium_pct ?? 0); return ( -
-
-

多空比 (L/S)

-

Long: {longPct.toFixed(1)}%

-

Short: {shortPct.toFixed(1)}%

+
+
+

多空比

+

L:{longPct.toFixed(1)}% S:{shortPct.toFixed(1)}%

-
-

大户持仓

-

大户做多: {topLong.toFixed(1)}%

-

方向: {topLong >= 55 ? "多头占优" : topLong <= 45 ? "空头占优" : "中性"}

+
+

大户持仓

+

多{topLong.toFixed(1)}% {topLong >= 55 ? "📈" : topLong <= 45 ? "📉" : "➖"}

-
-

持仓量 (OI)

-

{oiDisplay}

-

{Number(oiVal?.sumOpenInterest ?? 0).toFixed(0)} BTC

+
+

OI

+

{oiDisplay}

-
-

Coinbase Premium

-

= 0 ? "text-emerald-600" : "text-red-500"}`}>{premium >= 0 ? "+" : ""}{premium.toFixed(4)}%

-

机构: {premium > 0.005 ? "偏多" : premium < -0.005 ? "偏空" : "中性"}

+
+

CB Premium

+

= 0 ? "text-emerald-600" : "text-red-500"}`}>{premium >= 0 ? "+" : ""}{premium.toFixed(4)}%

); @@ -196,22 +190,21 @@ function SignalHistory({ symbol }: { symbol: Symbol }) { return (
-
-

最近信号

-

最近20条有效信号记录(北京时间)

+
+

最近信号

-
+
{data.map((s, i) => ( -
-
- +
+
+ {s.signal === "LONG" ? "🟢 LONG" : "🔴 SHORT"} - {bjtFull(s.ts)} + {bjtFull(s.ts)}
-
- {s.score}/100 - + {s.score} + = 85 ? "bg-red-100 text-red-700" : s.score >= 75 ? "bg-blue-100 text-blue-700" : "bg-slate-100 text-slate-600" @@ -258,76 +251,75 @@ function IndicatorCards({ symbol }: { symbol: Symbol }) { return (
- {/* CVD三轨 */} -
-
-

CVD_fast (30m)

-

= 0 ? "text-emerald-600" : "text-red-500"}`}> + {/* CVD三轨 - 紧凑一行 */} +

+
+

CVD_fast (30m)

+

= 0 ? "text-emerald-600" : "text-red-500"}`}> {fmt(data.cvd_fast)}

-

+

斜率: = 0 ? "text-emerald-600" : "text-red-500"}> - {data.cvd_fast_slope >= 0 ? "↑" : "↓"} {fmt(Math.abs(data.cvd_fast_slope))} + {data.cvd_fast_slope >= 0 ? "↑" : "↓"}{fmt(Math.abs(data.cvd_fast_slope))}

-
-

CVD_mid (4h)

-

= 0 ? "text-emerald-600" : "text-red-500"}`}> +

+

CVD_mid (4h)

+

= 0 ? "text-emerald-600" : "text-red-500"}`}> {fmt(data.cvd_mid)}

-

大方向: {cvdMidDir}头占优

+

{cvdMidDir}头占优

-
-

CVD_day (日内)

-

= 0 ? "text-emerald-600" : "text-red-500"}`}> +

+

CVD_day

+

= 0 ? "text-emerald-600" : "text-red-500"}`}> {fmt(data.cvd_day)}

-

盘中基线

+

盘中基线

- {/* ATR + VWAP + 大单 */} -
-
-

ATR (5m×14)

-

${fmt(data.atr_5m, 2)}

-

- 分位: 60 ? "text-amber-600 font-semibold" : "text-slate-500"}> - {data.atr_percentile.toFixed(0)}% + {/* ATR + VWAP + 大单 - 4列紧凑 */} +

+
+

ATR

+

${fmt(data.atr_5m, 2)}

+

+ 60 ? "text-amber-600 font-semibold" : "text-slate-400"}> + {data.atr_percentile.toFixed(0)}%{data.atr_percentile > 60 ? "🔥" : ""} - {data.atr_percentile > 60 ? " 🔥扩张" : data.atr_percentile < 40 ? " 压缩" : ""}

-
-

VWAP (30m)

-

${data.vwap_30m.toLocaleString("en-US", { maximumFractionDigits: 1 })}

-

- 价格在VWAP data.vwap_30m ? "text-emerald-600" : "text-red-500"}>{priceVsVwap} +

+

VWAP

+

${data.vwap_30m.toLocaleString("en-US", { maximumFractionDigits: 1 })}

+

+ 价格在 data.vwap_30m ? "text-emerald-600" : "text-red-500"}>{priceVsVwap}

-
-

大单阈值 P95

-

{data.p95_qty.toFixed(4)}

-

24h动态分位

+
+

P95

+

{data.p95_qty.toFixed(4)}

+

大单阈值

-
-

大单阈值 P99

-

{data.p99_qty.toFixed(4)}

-

超大单门槛

+
+

P99

+

{data.p99_qty.toFixed(4)}

+

超大单

- {/* 信号状态(V5.1) */} -
-

当前信号

-

当前信号

+

-

总分

-

{data.score}/100

-

档位: {data.tier === "heavy" ? "加仓" : data.tier === "standard" ? "标准" : data.tier === "light" ? "轻仓" : "不开仓"}

+

{data.score}/100

+

{data.tier === "heavy" ? "加仓" : data.tier === "standard" ? "标准" : data.tier === "light" ? "轻仓" : "不开仓"}

-
- - - - - +
+ + + + +
- {data.signal && ( -
- {core1} CVD_fast方向 - {core2} CVD_mid方向 - {core3} VWAP位置 -
- )}
); @@ -448,17 +432,17 @@ export default function SignalsPage() { ); return ( -
+
{/* 标题 */}
-

V5.1 信号引擎

-

五层100分评分 + 市场拥挤度 + 环境确认

+

⚡ 信号引擎 V5.1

+

五层100分评分 · 市场拥挤度 · 环境确认

-
+
{(["BTC", "ETH", "XRP", "SOL"] as Symbol[]).map(s => ( ))} @@ -469,8 +453,8 @@ export default function SignalsPage() { {/* Market Indicators */} -
-

Market Indicators

+
+

Market Indicators

@@ -479,10 +463,10 @@ export default function SignalsPage() { {/* CVD三轨图 */}
-
+
-

CVD三轨 + 币价

-

蓝色面积=CVD_fast(30m) · 紫色虚线=CVD_mid(4h) · 橙色虚线=币价

+

CVD三轨 + 币价

+

蓝=fast(30m) · 紫=mid(4h) · 橙=价格

{WINDOWS.map(w => ( @@ -493,15 +477,15 @@ export default function SignalsPage() { ))}
-
+
- {/* 说明 */} -
-

V5.1评分逻辑:方向层45分 + 拥挤层20分 + 环境层15分 + 确认层15分 + 辅助层5分(方向加速可额外+5)。

-

开仓档位:<60不开仓,60-74轻仓,75-84标准仓位,≥85允许加仓;信号冷却10分钟。

+ {/* 说明 - 紧凑 */} +
+ 评分:方向45 + 拥挤20 + 环境15 + 确认15 + 辅助5(+加速5)· + 档位:<60不开仓 · 60-74轻仓 · 75-84标准 · ≥85加仓
);