Indicators

Bollinger Bands

How your agent trades volatility

Bollinger Bands wrap a moving average with upper and lower bands based on volatility. They expand when the market is wild and contract when it's calm — telling your agent when price is stretched too far and when a big move is about to happen.

What Bollinger Bands Tell Your Agent

Bollinger Bands have three lines:

  • Middle Band — A 20-period moving average. This is the "fair value" line.
  • Upper Band — Middle band plus 2 standard deviations. Price touching this is statistically extended to the upside.
  • Lower Band — Middle band minus 2 standard deviations. Price touching this is statistically extended to the downside.

About 95% of price action stays within the bands. When price reaches the edges, something interesting is usually happening.

Your agent reads two key things from Bollinger Bands:

Band touches — Price hitting the lower band often snaps back toward the middle. Price hitting the upper band often pulls back. Your agent can trade these mean-reversion bounces.

Band width — When the bands squeeze tight, volatility is low and a breakout is brewing. When they expand, a big move is underway. Your agent can position for breakouts before they happen.

How Your Agent Calls Bollinger Bands

The agent sends:

  • Timeframe — Which chart to analyze (5-minute, 1-hour, daily, etc.)
  • Period — The moving average period (default: 20)
  • Standard deviations — How wide the bands are (default: 2)

The agent gets back:

  • upper_band: 48,200.50 — The upper boundary
  • middle_band: 47,100.00 — The fair value line
  • lower_band: 46,000.50 — The lower boundary
  • bandwidth: 4.67 — How wide the bands are (volatility measure)
  • percent_b: 0.15 — Where price sits within the bands (0 = lower, 1 = upper)

A percent_b of 0.15 means price is near the lower band — potentially oversold. If bandwidth is also low (bands are tight), a move is coming. The agent reads all of this in context with your other indicators.

Multi-Timeframe Bollinger Bands

Your agent can check Bollinger Bands across timeframes:

  • Daily bands — Price is in the middle of the daily range. No extreme on the big picture.
  • 1-hour bands — Price just touched the lower band. Short-term oversold.
  • 5-minute bands — Bands are squeezing tight. A breakout is imminent on the execution timeframe.

The agent combines these views: the daily says "no extreme," the hourly says "oversold," and the 5-minute says "about to move." If RSI confirms oversold, that's a multi-signal, multi-timeframe setup.

What Bollinger Bands Are Good For

Mean reversion — In range-bound markets, price bouncing off the lower band back to the middle is one of the most reliable patterns. Your agent can catch these trades automatically.

Breakout detection — When the bands squeeze tight (low bandwidth), it means the market is coiling. A breakout through the upper or lower band after a squeeze often leads to a strong trending move. Your agent can position early.

Volatility awareness — Even when not trading Bollinger signals directly, the bandwidth gives your agent a sense of market conditions. High volatility means wider stops needed. Low volatility means precision entries are possible.

What Bollinger Bands Aren't Good For

In strong trends, price can "walk the band" — staying pressed against the upper band in an uptrend or the lower band in a downtrend. Fading these touches (selling the upper band in a bull trend) will lose money. That's why pairing Bollinger Bands with a trend indicator like EMA helps your agent know whether to trade the bounce or ride the trend.

Next Steps