agentleFS
SKE-LabsSKE-Labs/agent-trading-skills/skills/technical-strategies/bollinger-bands/SKILL.md

bollinger-bands

Skill17 starsChanged 4 months agoApache-2.0View on GitHub

Define 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 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test closed-band exit, retest, and volume rules with a fixed horizon.

    line 36
  2. Distinctive:

    Treat the setup as a testable hypothesis, not a prediction.

    line 79
  3. Distinctive:

    Treat band expansion as a regime feature and test mean reversion/continuation separately.

    line 87
  4. Distinctive:

    Never enter on a band tag alone.

    line 88
  5. Distinctive:

    Treat 20/2 as a conventional starting specification.

    line 90

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Bollinger Bands Trading

Bollinger Bands measure volatility and identify potential reversals and breakouts.

Components

BandCalculationMeaning
Middle20 SMATrend baseline
UpperSMA + k StdDevUpper volatility envelope
LowerSMA - k StdDevLower volatility envelope

Band Width = (Upper - Lower) / Middle * 100

Signals

Mean Reversion (Range Trading)

  • A band tag is descriptive, not a reversal signal.
  • Define regime, %b/distance, objective reversal trigger, invalidation, and middle-band target before testing.
  • Calibrate any RSI or candlestick filter; both are derived from the same price history.

Bollinger Squeeze (Breakout)

  • Define a squeeze by rolling bandwidth percentile within the same instrument/session.
  • A squeeze indicates low relative volatility, not that a breakout is imminent or directional.
  • Test closed-band exit, retest, and volume rules with a fixed horizon.

Band Riding (Trend Trading)

  • Uptrend: price hugs upper band, pullbacks to middle band are entries
  • Downtrend: price hugs lower band, rallies to middle band are entries

W-Bottom / M-Top

  • W-Bottom at lower band = bullish reversal
  • M-Top at upper band = bearish reversal

Workflow

  1. Get Bollinger Bands:
    get_indicators(indicator_code="bbands", symbol=<symbol>, exchange=<exchange>, interval=<interval>)
  2. Calculate Band Width: (Upper - Lower) / Middle * 100
    • Report rolling percentile and historical sample; do not use universal percentage cutoffs.
  3. Confirm with RSI:
    get_indicators(indicator_code="rsi", symbol=<symbol>, exchange=<exchange>, interval=<interval>)
  4. Identify setup: band edge + reversal candle → mean reversion; squeeze + volume → breakout
  5. Mark on chart:
    draw_chart_analysis(action="create", drawing={
        "type": "highlight",
        "points": [
            {"time": <start_time>, "price": <upper_band>},
            {"time": <end_time>, "price": <lower_band>}
        ],
        "options": {"text": "BB Squeeze (Width: 1.8%)"}
    })

Evidence and Validation

  • Treat the setup as a testable hypothesis, not a prediction. Define thresholds, entry, invalidation, and exit before evaluating outcomes.
  • Calibrate on the same instrument, venue, session, and timeframe. Use closed candles and a held-out or walk-forward sample; record every variant tried.
  • 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.
  • Return observed inputs, missing data, cost assumptions, entry, invalidation, exit, and a valid, watch, or no-trade status.
  • Research basis: John Bollinger's 22 rules state that band tags are not signals and outside closes are initially continuation—not reversal—signals.

Key Rules

  • Treat band expansion as a regime feature and test mean reversion/continuation separately.
  • Never enter on a band tag alone; apply the predeclared price trigger.
  • Define squeezes by an instrument-specific rolling percentile.
  • Treat 20/2 as a conventional starting specification; record every lookback/multiplier tried.
  • Per Bollinger's rules, an outside close is initially continuation information, not automatic reversal.

Related Skills

  • mean-reversion — adds z-score and RSI frameworks to BB touch signals
  • market-regime-detection — BB Width is a key volatility input for regime classification

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.