All indicators

Bollinger Bands + Higher Time Frames

Feb 19, 2020

Static chart image
Dynamic OverlaysSupport and ResistanceTime BasedMoving AveragesVolatility

The Bollinger Bands + Higher Time Frames indicator provides a comprehensive view of price volatility and trend across multiple timeframes by overlaying up to six sets of Bollinger Bands on a single chart. This tool aims to help traders identify key support and resistance areas derived from higher timeframe analysis without needing to switch between different chart views.

Usage

This indicator can be used to spot confluences between standard Bollinger Bands and those calculated from higher timeframes (HTF). When multiple bands from different timeframes converge in the same price area, it often signifies a significant zone of support or resistance.

  • Multi-Timeframe Analysis: Enable up to six different HTF selections to see how current price action relates to the volatility boundaries of longer-term cycles (e.g., 4H, Daily, Weekly).
  • Trend Identification: Use the basis lines of the HTF bands to determine the overall trend direction on larger scales while trading on a lower timeframe.
  • Volatility Contraction/Expansion: Monitor the width of the bands across different timeframes to identify periods of equilibrium or impending breakouts.

Details

The script utilizes specialized timeframe selection logic to offer flexibility in how HTF data is fetched. Users can choose between fixed timeframes, multiples of the current chart timeframe, or discrete steps (e.g., moving from 1H to Daily).

To ensure visual clarity, the indicator includes optional smoothing for the HTF lines to reduce the "staircase" effect often seen with multi-timeframe data. It also includes an option for "Repainting" vs. "Non-Repainting" HTF data. The non-repainting mode uses lookahead = barmerge.lookahead_on with a historical offset to ensure that the data plotted for a higher timeframe bar is only what was available at the close of that period.

Settings

Bollinger Bands

  • Length: The period used to calculate the Simple Moving Average (SMA) basis.
  • Source: The price data used for calculation (e.g., Close, HL2).
  • BB Bands StDev: The standard deviation multiplier for the upper and lower bands.
  • Show BB bands?: Toggles the visibility of the primary Bollinger Bands.
  • Colour fill: Toggles the background fill between the upper and lower bands.

HTF Selections (1-6)

  • Higher Timeframe Selection: Choose between "None", "Discrete Steps", "Multiple of Current TF", or "Fixed TF".
  • Multiple of Current TF: Sets the multiplier if using the "Multiple" selection mode.
  • Fixed TF: Sets the specific timeframe if using the "Fixed" selection mode.
  • Repainting HTF: Determines if the HTF data updates in real-time (repaints) or waits for the HTF bar to close.
  • Smooth Higher Timeframe: Enables an EMA-based smoothing to the HTF lines.
  • Smoothing Length: Adjusts the intensity of the smoothing filter.

Visuals

  • Labels + Values?: Toggles the visibility of price and timeframe labels on the right side of the chart.
  • Label Size: Controls the font size of the on-chart labels.
  • Labels Offset: Adjusts the horizontal spacing of labels to prevent overlapping.

FAQ

How can I use this for trend following?

You can look for instances where price is trending above the basis lines of both the local and higher timeframe Bollinger Bands, suggesting strong bullish momentum across multiple horizons.

What is the difference between Discrete Steps and Fixed TF?

Discrete Steps automatically picks the next logical timeframe higher than your current one (e.g., from 1H to Daily), whereas Fixed TF allows you to lock in a specific timeframe regardless of your current chart view.

How do I access Bollinger Bands + Higher Time Frames?

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

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.