用于SMC(聪明钱概念)+宏观轮动策略的模拟交易监控。包含波段(4H BoS+FVG)、日内(1H BoS+FVG+CVD)、协调8D/2S编排...
Paper trading system implementing Smart Money Concepts across five strategy types plus a macro rotation overlay and regime filter. All data from Binance public API — no account or API key required.
macro-rotation.js) — LTPI/MTPI + Relative Strength Tournament, daily rebalance, $10K capitalregime-scorer.js) — 15 TA indicators + 5 FRED liquidity factors → STPI/MTPI/LTPI scorespaper-monitor-v6.js) — SMC+TA≥5 gated by STPI ≥ 0.5paper-monitor-swing-v2.js) — Swing strategy gated by MTPI ≥ 0.5text
Binance Public API (Kline, Ticker, Funding, OI)
↓
regime-scorer.js → regime.json (STPI, MTPI, LTPI)
↓
paper-monitor-[strategy].js
├── Fetch candles (1H/4H/1D)
├── Detect Break of Structure (BoS)
├── Find Fair Value Gaps (FVG)
├── Z-score: Volume, TA, FVG quality
├── ATR-based SL / TP / Trailing stop
├── Regime gate: STPI/MTPI threshold check
├── Orchestrator lock read/write
└── portfolio-[strategy].json (P&L tracking)
macro-rotation.js
├── Daily candles + 7d close for all tokens
├── LTPI: M2/liquidity proxy via BTC dominance + funding
├── MTPI: momentum + derivatives composite
├── RS Tournament: z-scored returns → top 1-3 tokens
└── portfolio-macro.json ($10K, daily rebalance)
paper-dashboard/index.html (5-curve equity chart)
StrategyFileTimeframeGateMax HoldSlotsSwingpaper-monitor-swing.jsDaily BoS + 4H FVGEMA72h5Swing v2paper-monitor-swing-v2.jsDaily BoS + 4H FVGMTPI ≥ 0.572h5Day v5paper-monitor-v5.js1H BoS + FVG + CVDNone12h10Day v6paper-monitor-v6.js1H BoS + FVGSTPI ≥ 0.512h10Coordinatedpaper-monitor-coordinated.js1H + 4H mixedLockvaries10Macro Rotationmacro-rotation.jsDaily candlesLTPI + MTPIDaily$10K
regime-scorer.js produces regime.json with three probability indicators:
Indicators per timeframe: EMA cross, ADX, MA200, RSI, MACD, BBwidth, ATR pct, OBV, CVD z-score, funding rate, long/short ratio, OI delta, Fear & Greed (macro only).
LTPI/MTPI guide overall allocation:
RS Tournament: z-scored 7d returns across 30+ tokens → rotates into top 1-3 by strength.
All SMC monitors share orchestrator-lock.json — prevents same-symbol entries across strategies:
json
{
"BTCUSDT": { "strategy": "swing", "entryTime": 1742400000000 },
"ETHUSDT": { "strategy": "day", "entryTime": 1742405000000 }
}
json
{
"balance": 1000,
"positions": [],
"history": [],
"metrics": { "totalTrades": 0, "wins": 0, "losses": 0, "winRate": 0 }
}
Macro: starts at $10,000.
bash
# Regime (every 15m)
node scripts/regime-scorer.js
# Day v5: every 1h (XX:02)
node scripts/paper-monitor-v5.js
# Day v6 (STPI-gated): every 1h (XX:03)
node scripts/paper-monitor-v6.js
# Swing (EMA-gated): every 4h (XX:30)
node scripts/paper-monitor-swing.js
# Swing v2 (MTPI-gated): every 4h (XX:35)
node scripts/paper-monitor-swing-v2.js
# Coordinated 8D/2S: every 1h (XX:05)
node scripts/paper-monitor-coordinated.js
# Macro Rotation: daily (00:15 UTC)
node scripts/macro-rotation.js
text
Regime: 50 * * * * (XX:50 UTC every 1h)
Day v5: 2 * * * * (XX:02 UTC every 1h)
Day v6: 3 * * * * (XX:03 UTC every 1h)
Swing: 30 */4 * * * (XX:30 UTC every 4h)
Swing v2: 35 */4 * * * (XX:35 UTC every 4h)
Coordinated: 5 * * * * (XX:05 UTC every 1h)
Macro Rotation: 15 0 * * * (00:15 UTC daily)
text
scripts/
paper-monitor-swing.js — swing (EMA-gated)
paper-monitor-swing-v2.js — swing (MTPI-gated, NEW v2.0)
paper-monitor-v5.js — day + CVD
paper-monitor-v6.js — day + STPI gate (NEW v2.0)
paper-monitor-coordinated.js — 8D/2S coordinated
macro-rotation.js — LTPI/MTPI + RS Tournament (NEW v2.0)
regime-scorer.js — Multi-factor regime scoring (NEW v2.0)
paper-dashboard/index.html — 5-curve equity chart