用于加密货币的高频模拟交易框架,多指标技术分析评分(RSI/MACD/EMA/BB/OBV/StochRSI),双区间过滤(15分钟快线+4小时宏观),...
A complete high-frequency paper trading system for building and testing autonomous crypto trading agents.
text
Market Data (Binance public API)
↓
TA Engine (RSI + MACD + EMA + BB + OBV + StochRSI)
↓
Signal Score (-10 to +10)
↓
Dual Regime Filter (15m EMA8/21 fast + 4h EMA20/50 macro)
↓
Kelly Position Sizer (3% max risk per trade)
↓
Paper Portfolio Manager (portfolio.json)
↓
Trade Ledger (journal.json) + Auto-Observation Logger (observations.md)
observations.md for strategy learningtext
Use hft-paper-trader to run TA on BTC and place a paper trade
Use hft-paper-trader to check portfolio performance
Use hft-paper-trader to scan the watchlist and trade all signals
Use hft-paper-trader to check today's observations and lessons
Entries are only allowed when BOTH regimes are bullish:
This gates out counter-trend entries that otherwise pass signal scoring. When either regime is bearish, new positions are blocked regardless of score.
js
// CORRECT — caps SL at 3% below entry
stopLoss = entry * (1 - MAX_RISK); // Math.max not used here — direct cap
// Bug in v1.0.0 — Math.min let SL run to 5-11%
// Fix: use direct percentage cap on entry price, not min of wick distance
BTC ETH SOL XRP TRX DOGE ADA AVAX BNB LINK LTC SUI ARB OP NEAR DOT ATOM UNI MATIC
text
trading/
paper-dashboard/portfolio.json ← live portfolio state
journal.json ← full trade ledger
observations.md ← auto-logged trade lessons
Starting capital: $1,000. Runs hourly (XX:01 UTC). Max 5 concurrent positions at 10% each.