poly5m-v2 — Reactive ATR-adaptive scalper

v1 signal with ATR-adaptive entry (0.8 × ATR, 0.10% fallback) and entry window 20-200s. Adds time exit at 120s held and CLOB drawdown exit at $0.44. Trades all hours.

Version v1.0.0 · One-time payment · Source code download
Strategy typeScalping
AssetBTC
Timeframe5m
Market typeCrypto binary
Minimum capital$30
Dependencies@polymarket/clob-client, ws, ethers

What it does

poly5m-v2 takes v1's entry idea (Binance move triggers a taker on the trending side) and adds two improvements: the entry threshold scales with realized volatility (ATR-adaptive instead of static 0.10%), and two new exits guard against stuck positions (time-based at 120s held, CLOB drawdown at $0.44 bid).

The edge

v1's static 0.10% threshold misfires across volatility regimes: too tight in calm markets (no trades), too loose in volatile ones (overtrading on noise). v2's threshold scales: threshold = max(0.10%, 0.8 × ATR_pct). In calm markets you keep the 0.10% floor; in volatile markets the bar rises automatically.

The two added exits cap downside on individual trades. The time exit catches positions that haven't moved 2 minutes in (often a sign the signal was wrong). The drawdown exit catches positions where the book has rolled against you (best bid dropping below $0.44 indicates the MMs no longer want the trade).

How it works

  1. Connect to Binance WebSocket
  2. ATR computation: rolling from Binance 1-minute candles
  3. Adaptive threshold: max(0.10%, 0.8 × ATR_pct)
  4. Entry window: 20s to 200s into the candle (20s wait gives ATR enough history)
  5. Trend gate: skip if BTC is more than 0.10% counter to the 15-min SMA trend
  6. FOK taker at $0.51, sized at 8% of balance (BET_PCT)
  7. Reversal exit: best bid drops below $0.48 (REVERSAL_EXIT_PRICE)
  8. Time exit: 120s after entry, force-close if still on the losing side (EXIT_TIME_GATE)
  9. CLOB drawdown exit: best bid drops below $0.44 (ODDS_DRAWDOWN_EXIT)
  10. Trades all hours (SKIP_HOURS_UTC empty by default)

Risk: MAX_CONSEC_LOSSES = 5 triggers cooldown.

Sample output

[25/05/2026, 14:32:14] 📡 Binance connected [25/05/2026, 14:33:01] BTC +0.14% ATR=0.18% threshold=0.144% — entering Up [25/05/2026, 14:33:01] BUY (FOK) 15sh @ $0.51 ($7.71 incl fee) [25/05/2026, 14:35:01] Resolved WIN | +$7.29 | Bal: $37.29 [25/05/2026, 15:42:14] Drawdown exit: best bid $0.43 < $0.44 [25/05/2026, 15:42:14] SELL 15sh @ $0.43 ($6.45 net) | Bal: $36.50

Design targets

Break-even at $0.51 taker: required WR ≈ 51.6%. Design target 53-57% WR after ATR gating, with the time/drawdown exits cutting the worst losses to ~30% of bet instead of full $0.51-to-$0 swings.

Trade rate: similar to v1 (10-25 trades/day) but distribution shifts: fewer trades in calm markets, more in volatile ones, and traded across all hours instead of skipping US session.

FAQ

When does v2 beat v1?

Volatile regimes. v1's static threshold misfires when ATR jumps. v2's adaptive threshold raises the bar exactly when noise would have triggered v1. Net effect: similar WR with fewer losing trades.

When does v1 beat v2?

Calm regimes during the US session. v1 skips US hours entirely; v2 trades them and historically gives back some edge there.

What's included

  • poly5m/poly5m-v2.js
  • poly5m/scripts/v2-run.sh
  • polymarket-limits.js
  • README with ATR window tuning and exit threshold tuning

Configuration

FlagDefaultDescription
--asset BTCBTCAsset to trade. BTC, ETH, SOL, XRP supported.
--livePlace real orders. Default is dry-run.
--sim-balance 3030Starting balance in dry-run mode (USD).
--max-bet 1010Hard cap per trade in USD.

Related bots