$npx -y skills add SKE-Labs/agent-trading-skills --skill bollinger-bandsDefine and test Bollinger bandwidth, percent-b, squeeze, continuation, and mean-reversion rules. Use when measuring relative volatility and evaluating closed-band triggers without treating tags as signals.
| 1 | # Bollinger Bands Trading |
| 2 | |
| 3 | Bollinger Bands measure volatility and identify potential reversals and breakouts. |
| 4 | |
| 5 | ## Components |
| 6 | |
| 7 | | Band | Calculation | Meaning | |
| 8 | | ---------- | -------------- | --------------------- | |
| 9 | | **Middle** | 20 SMA | Trend baseline | |
| 10 | | **Upper** | SMA + k StdDev | Upper volatility envelope | |
| 11 | | **Lower** | SMA - k StdDev | Lower volatility envelope | |
| 12 | |
| 13 | **Band Width** = `(Upper - Lower) / Middle * 100` |
| 14 | |
| 15 | ## Signals |
| 16 | |
| 17 | ### Mean Reversion (Range Trading) |
| 18 | |
| 19 | - A band tag is descriptive, not a reversal signal. |
| 20 | - Define regime, `%b`/distance, objective reversal trigger, invalidation, and middle-band target before testing. |
| 21 | - Calibrate any RSI or candlestick filter; both are derived from the same price history. |
| 22 | |
| 23 | ### Bollinger Squeeze (Breakout) |
| 24 | |
| 25 | - Define a squeeze by rolling bandwidth percentile within the same instrument/session. |
| 26 | - A squeeze indicates low relative volatility, not that a breakout is imminent or directional. |
| 27 | - Test closed-band exit, retest, and volume rules with a fixed horizon. |
| 28 | |
| 29 | ### Band Riding (Trend Trading) |
| 30 | |
| 31 | - Uptrend: price hugs upper band, pullbacks to middle band are entries |
| 32 | - Downtrend: price hugs lower band, rallies to middle band are entries |
| 33 | |
| 34 | ### W-Bottom / M-Top |
| 35 | |
| 36 | - W-Bottom at lower band = bullish reversal |
| 37 | - M-Top at upper band = bearish reversal |
| 38 | |
| 39 | ## Workflow |
| 40 | |
| 41 | 1. **Get Bollinger Bands**: |
| 42 | ``` |
| 43 | get_indicators(indicator_code="bbands", symbol=<symbol>, exchange=<exchange>, interval=<interval>) |
| 44 | ``` |
| 45 | |
| 46 | 2. **Calculate Band Width**: `(Upper - Lower) / Middle * 100` |
| 47 | - Report rolling percentile and historical sample; do not use universal percentage cutoffs. |
| 48 | |
| 49 | 3. **Confirm with RSI**: |
| 50 | ``` |
| 51 | get_indicators(indicator_code="rsi", symbol=<symbol>, exchange=<exchange>, interval=<interval>) |
| 52 | ``` |
| 53 | |
| 54 | 4. **Identify setup**: band edge + reversal candle → mean reversion; squeeze + volume → breakout |
| 55 | |
| 56 | 5. **Mark on chart**: |
| 57 | ``` |
| 58 | draw_chart_analysis(action="create", drawing={ |
| 59 | "type": "highlight", |
| 60 | "points": [ |
| 61 | {"time": <start_time>, "price": <upper_band>}, |
| 62 | {"time": <end_time>, "price": <lower_band>} |
| 63 | ], |
| 64 | "options": {"text": "BB Squeeze (Width: 1.8%)"} |
| 65 | }) |
| 66 | ``` |
| 67 | |
| 68 | ## Evidence and Validation |
| 69 | |
| 70 | - Treat the setup as a testable hypothesis, not a prediction. Define thresholds, entry, invalidation, and exit before evaluating outcomes. |
| 71 | - Calibrate on the same instrument, venue, session, and timeframe. Use closed candles and a held-out or walk-forward sample; record every variant tried. |
| 72 | - Include spread, fees, slippage, borrow or funding, partial fills, and latency. Reject the setup when net expectancy is not positive or depends on one narrow parameter. |
| 73 | - Return observed inputs, missing data, cost assumptions, entry, invalidation, exit, and a valid, watch, or no-trade status. |
| 74 | - Research basis: John Bollinger's [22 rules](https://cmtassociation.org/technically_speaking/technically-speaking-march-2013/) state that band tags are not signals and outside closes are initially continuation—not reversal—signals. |
| 75 | |
| 76 | ## Key Rules |
| 77 | |
| 78 | - Treat band expansion as a regime feature and test mean reversion/continuation separately. |
| 79 | - Never enter on a band tag alone; apply the predeclared price trigger. |
| 80 | - Define squeezes by an instrument-specific rolling percentile. |
| 81 | - Treat 20/2 as a conventional starting specification; record every lookback/multiplier tried. |
| 82 | - Per Bollinger's rules, an outside close is initially continuation information, not automatic reversal. |
| 83 | |
| 84 | ## Related Skills |
| 85 | |
| 86 | - **mean-reversion** — adds z-score and RSI frameworks to BB touch signals |
| 87 | - **market-regime-detection** — BB Width is a key volatility input for regime classification |