Polymarket's "Bitcoin Up or Down - 5 Minutes" market simulated trading system.
Market Structure
- Gameplay: Within a 5-minute window, will BTC go Up or Down
- Odds: ~50/50 (Up 49-52¢ / Down 48-51¢)
- Settlement: Chainlink BTC/USD, window end price vs start price
- Frequency: One round every 5 minutes, continuous 24/7
- URL Pattern:
polymarket.com/event/btc-updown-5m-{unix_timestamp}
Signal System (6 Layers)
Run signal scan: bash scripts/scan_signals.sh
| ID | Strategy | Trigger Condition | Direction | Confidence |
|---|---|---|---|---|
| S1 | Momentum Following | Last 3 1m candles in the same direction | Follow | Medium |
| S2 | Mean Reversion | 5min cumulative volatility > ±$150 | Reverse | Medium-High |
| S3 | Volume Breakout | Latest vol > 2x average of last 25 candles | Follow volume direction | High |
| S4 | RSI Extremes | 1m RSI <25 or >75 | Reverse | Medium |
| S5 | Odds Deviation | Polymarket Up/Down deviation >55/45 | Contrarian | Low |
| S6 | Support/Resistance Levels | Price near 24h high/low or round numbers | Bounce/Breakout | Medium-High |
S6 Support/Resistance Level Strategy (added 3/12)
Core Idea: Prices are not a random walk; key price levels have "memory".
Identification Method:
# 获取支撑/阻力位
curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=BTCUSDT' | jq '{high:.highPrice,low:.lowPrice}'
curl -s 'https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1h&limit=24' | python3 -c "
import json,sys
candles=json.load(sys.stdin)
lows=[float(k[3]) for k in candles]
highs=[float(k[2]) for k in candles]
price=float(candles[-1][4])
support=min(lows)
resistance=max(highs)
print(f'现价: ${price:,.0f}')
print(f'24h支撑: ${support:,.0f} (距{(price-support)/price*100:.1f}%)')
print(f'24h阻力: ${resistance:,.0f} (距{(resistance-price)/price*100:.1f}%)')
# 整数关口
for level in range(int(price//1000)*1000, int(price//1000+2)*1000, 1000):
dist=(level-price)/price*100
if abs(dist)<2:
print(f'整数关口: ${level:,} (距{dist:+.1f}%)')
"
Signal Rules:
- Price within 0.3% of support + previous candle has a long lower wick → UP signal (support bounce)
- Price within 0.3% of resistance + previous candle has a long upper wick → DOWN signal (resistance rejection)
- Price breaks above resistance (close > resistance) + volume surge → UP signal (breakout follow)
- Price breaks below support (close < support) + volume surge → DOWN signal (breakdown follow)
Synergy with Other Strategies:
- S6 support bounce + S2 mean reversion → high-confidence combo
- S6 breakout + S3 volume surge → high-confidence combo
- S6 resistance rejection + S1 downward momentum → strengthened short signal
Entry Rules
- ≥2 strategies in the same direction → Enter, virtual $2
- 1 signal → SKIP, record the lean
- 0 signals → SKIP
Exit Rules
- Hold until the 5min window settles, no early exit
- Fixed $2 per trade (virtual), no adding to position
Workflow
1. Scan Signals
bash scripts/scan_signals.sh
Output the signal status of each strategy and the overall recommendation.
2. Record Trade
Append the result to data/paper-trading/YYYY-MM-DD.md:
- Window time, BTC price, triggered signals
- Decision (ENTER/SKIP), direction (UP/DOWN), entry odds
- Result (WIN/LOSS), P&L
3. Update Statistics
Update data/paper-trading/strategy-stats.json:
- Independent win rate of each strategy
- Combined signal win rate
- Cumulative virtual P&L
4. Iterative Optimization
After every 20 accumulated trades, analyze:
- Which strategy has the highest win rate?
- Which combinations are most profitable?
- Do the thresholds need adjustment?
Record findings to
references/iteration-log.md
Threshold Parameters (Adjustable)
See references/parameters.md — all adjustable parameters are centrally managed.
Key Constraints
- ⚠️ Never place real orders — purely simulated!
- Virtual capital: $100
- Per trade: $2 (2%)
- Data source: Binance API (
api.binance.com/api/v3/klines) - Odds: win returns $2/odds (e.g., buy at 50¢, win returns $4, net profit $2)
- Loss: lose $2