All indicators

Bollinger bands and Keltner bands

Nov 6, 2021

Static chart image
Support and ResistanceVolume BasedMoving AveragesVolatility

The Bollinger bands and Keltner bands indicator provides a multi-layered volatility analysis tool designed for scalping by combining standard Bollinger Bands with Keltner Channel dynamics and weighted standard deviation clouds.

Usage

The tool is primarily used to identify support and resistance zones through its "Weighted Cloud" feature. By default, the script plots standard Bollinger Band deviations (2nd and 3rd) as a white cloud. Simultaneously, it calculates a linear-weighted standard deviation that interacts with these bands, creating dynamic areas that signal potential price exhaustion or trend continuation.

When price interacts with the weighted resistance cloud (the upper colored zone) or the weighted support cloud (the lower colored zone), it suggests potential reversal or breakout points. Traders can also enable the ATR-based Keltner bands in the settings to add further confluence to their volatility analysis.

Details

This indicator utilizes a non-traditional approach to standard deviations. While standard Bollinger Bands use a simple moving average and standard deviation, this script incorporates a linear-weighted standard deviation calculated via an array-based function. This weighted calculation is compared against the standard bands to create a "cutting in and out" effect, which helps filter noise and highlight stronger support or resistance levels.

Note that the weighted cloud requires volume data for its "volMa" component; if volume data is unavailable for a specific ticker, the script will default to its standard band behavior.

Settings

General Settings

  • Length: Determines the lookback period for both the basis moving average and the standard deviation calculations.
  • Source: The price data used for calculations (default is Close).
  • Basis: Allows users to select the type of moving average used for the center line. Options include SMA, EMA, WMA, VWMA, RMA, ALMA, and HMA.

ATR Settings

  • ATR: Sets the length for the Average True Range used in the Keltner band components.
  • Theme: Adjusts the visual coloring of the ATR bands between Default, All Foreground, and All Background presets.

FAQ

How do I access Bollinger bands and Keltner bands?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Why are the clouds not appearing on my chart?

The weighted cloud components utilize volume-weighted calculations. If your current data provider or asset (such as some Forex pairs or indices) does not provide volume data, the weighted cloud elements may not render correctly.

What is the difference between the standard bands and the weighted cloud?

Standard bands represent fixed statistical deviations from the mean. The weighted cloud uses a linear-weighted standard deviation, which reacts differently to recent price volatility and volume, providing a more refined view of potential support and resistance.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.