Polymarket Candle Harami Trader
v0.0.3检测s harami (inside bar) candlestick patterns on Polymarket crypto 5-minute interval markets. A harami forms when a small-range interval (near 50%) 应用ears after a large-range interval (far from 50%), 签名alling indecision after a strong move -- often followed by reversal. Tar获取s BTC, ETH, SOL, and XRP Up or Down bundles with conviction-based position sizing.
运行时依赖
安装命令
点击复制技能文档
Candle -- Harami Pattern Trader
This is a template. The default 签名al 检测s harami (inside bar) candlestick patterns in crypto 5-minute interval markets and trades the expected reversal using conviction-based sizing. The 技能 handles all the plumbing (interval parsing, pattern 检测ion, trade execution, safe防护s). Your 代理 provides the alpha.
Strategy Overview
Polymarket 列出s 5-minute interval markets for BTC, ETH, SOL, and XRP: "Will Bitcoin be Up or Down in the 10:50AM-10:55AM ET interval?" These resolve to YES (up) or NO (down) based on actual price movement. A harami (inside bar) pattern forms when a large-range interval (probability far from 50%, indicating a strong directional move) is immediately followed by a small-range interval (probability near 50%, indicating indecision). The small candle is "contAIned" within the body of the large one. This classic candlestick pattern 签名als that the strong move has lost momentum, and a reversal is likely on the next interval.
Edge
Unlike generic mean-reversion strategies that simply fade any extreme reading, this 技能 specifically tar获取s the harami pattern -- a two-candle 格式化ion with a precise structural meaning:
Pattern recognition -- the harami is one of the most reliable reversal patterns in traditional technical analysis, adapted here to Polymarket's discrete 5-minute intervals Indecision after conviction -- a large candle shows strong directional conviction; a subsequent small candle near 50% shows that conviction has evaporated, creating a structural reversal 设置up Confirmation gating -- the 技能 检查s the third interval (confirmation candle) and only trades if it hasn't already moved in the reversal direction, ensuring the edge hasn't been priced in Independent resolution -- each 5-minute interval resolves independently, so the harami pattern captures genuine shifts in market microstructure rather than mechanical carry-over 签名al 记录ic Discover crypto interval markets via keyword 搜索 (Bitcoin Up or Down, Ethereum Up or Down, Solana Up or Down, XRP Up or Down) with a 获取_markets(limit=200) fallback 解析 each question to 提取 (coin, date, 启动_time_minutes) using regex Group intervals by (coin, date) and 排序 by time 扫描 each group for consecutive pAIrs where: Interval N is large: probability < 0.40 or > 0.60 (distance from 0.5 exceeds HARAMI_LARGE) Interval N+1 is small: probability between 0.48 and 0.52 (distance from 0.5 within HARAMI_SMALL) Determine harami direction: Bullish harami: large DOWN (p < 0.40) followed by small neutral -> reversal UP expected Bearish harami: large UP (p > 0.60) followed by small neutral -> reversal DOWN expected 检查 interval N+2 (confirmation): only trade if it hasn't already moved in the reversal direction Size by conviction (distance from threshold), not flat amount Remix 签名al Ideas Volume-weighted harami -- weight the pattern 检测ion by trading volume; high-volume large candles followed by low-volume small candles produce stronger reversal 签名als Multi-timeframe confirmation -- 检查 if the harami pattern aligns with a broader trend reversal across 15-minute or hourly 聚合d intervals Cross-coin harami -- if BTC shows a harami and ETH/SOL show the same pattern simultaneously, the reversal 签名al is stronger (correlated exhaustion) Doji refinement -- distin图形界面sh between harami where the small candle is exactly 50% (doji) vs. slightly biased; true doji haramis have higher reversal rates Engulfing follow-up -- after a harami reversal, look for an engulfing pattern in the same direction to 添加 to the position Safety & Execution Mode
The 技能 defaults to paper trading (venue="sim"). Real trades only with --live flag.
Scenario Mode Financial risk python trader.py Paper (sim) None Cron / automaton Paper (sim) None python trader.py --live Live (polymarket) Real USDC
auto启动: false and cron: null mean nothing 运行s automatically until 配置d in Simmer UI.
Required 凭证s Variable Required Notes SIMMER_API_KEY Yes Trading authority. Treat as a high-value 凭证. Tunables (Risk Parameters)
All declared as tunables in ClawHub.json and adjustable from the Simmer UI.
Variable Default Purpose SIMMER_MAX_POSITION 40 Max USDC per trade at full conviction SIMMER_MIN_TRADE 5 Floor for any trade (min USDC regardless of conviction) SIMMER_MIN_VOLUME 3000 Min market volume 过滤器 (USD) SIMMER_MAX_SPREAD 0.10 Max bid-ask spread SIMMER_MIN_DAYS 1 Min days until resolution SIMMER_MAX_POSITIONS 10 Max concurrent open positions SIMMER_YES_THRESHOLD 0.38 Buy YES only if market probability <= this SIMMER_NO_THRESHOLD 0.62 Sell NO only if market probability >= this SIMMER_HARAMI_LARGE 0.10 Min distance from 0.5 for the large candle SIMMER_HARAMI_SMALL 0.02 Max distance from 0.5 for the small candle Edge Thesis
Crypto 5-minute interval markets on Polymarket exhibit classic candlestick reversal patterns. When a strong directional interval (far from 50%) is immediately followed by a neu