All indicators

linear and Bollingers Bands and Fibonacci ratios

Jun 25, 2019

Static chart image
Support and ResistanceChannelsFibonacciMoving AveragesVolatility

The linear and Bollingers Bands and Fibonacci ratios indicator provides a comprehensive volatility and trend analysis tool by combining three distinct technical concepts into a single visual framework. It aims to identify potential support and resistance zones by overlaying linear regression channels, dynamic Fibonacci-based levels, and standard Bollinger Bands to help traders visualize price exhaustion and trend direction.

Usage

The tool is designed to highlight areas of confluence where different volatility metrics align. Users can observe how price interacts with:

  • Linear Regression Channel: Visualizes the current trend direction and mean reversion levels using a central regression line and shaded deviation bands.
  • Fibonacci Ratios: Plots dynamic horizontal levels based on ATR-calculated Fibonacci expansions (1.618, 2.618, and 4.236), which serve as deep support and resistance targets.
  • Bollinger Bands: Standard volatility bands that adapt to price fluctuations, providing traditional breakout and mean-reversion signals.

By observing these three layers simultaneously, traders can identify high-probability reversal zones when price touches multiple boundaries from different calculation methods at once.

Details

The script executes several calculations to establish its boundary levels:

  • Fibonacci Levels: Uses a Simple Moving Average (SMA) as a baseline and adds/subtracts multiples of the Average True Range (ATR) based on user-defined Fibonacci ratios.
  • Bollinger Bands: Employs a standard standard deviation calculation from a moving average source.
  • Linear Regression: Calculates a "best fit" line for the price over a specific lookback period to establish the trend's center.

Settings

General Settings

  • Label Offset 1 / 2: Adjusts the horizontal positioning of the labels on the chart.
  • SMA/ATR Length: The lookback period used for the Fibonacci-based ATR calculations and the central SMA.
  • Fibonacci Ratios (1-3): Custom multipliers for the ATR-based bands (Defaults: 1.618, 2.618, 4.236).
  • Close Offset: An offset parameter for price calculations.

Bollinger Bands

  • BB Length: The period used for the Bollinger Band SMA and Standard Deviation.
  • Source: The price input used for Bollinger Band calculations (e.g., Close, Open, HL2).
  • BB Multiplier: The standard deviation multiplier for the width of the bands.

Linear Regression

  • LinReg Length: The lookback period for the linear regression calculation.
  • Upper/Lower Deviation: Toggles for the visibility of the linear regression channel boundaries.
  • Ratio 2: Multiplier used to determine the width of the regression channel based on the ATR.

FAQ

How do I use the different colored bands?

The blue and red shaded areas represent the Linear Regression channel, while the solid green lines represent Bollinger Bands. The horizontal labeled lines represent the Fibonacci ATR levels. Confluence between these different lines often indicates strong support or resistance.

Can I change the Fibonacci levels?

Yes, you can modify the three Fibonacci ratios in the settings menu to suit your specific trading strategy or asset class.

How can I access linear and Bollingers Bands and Fibonacci ratios?

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.