Fibonacci Ribbon
May 16, 2022

The Fibonacci Ribbon indicator provides a visual trend analysis tool by calculating two Fibonacci-weighted moving averages to identify market momentum and sentiment. By comparing a Fibonacci Weighted Moving Average (WMA) and a Fibonacci Exponential Moving Average (EMA), the tool creates a dynamic ribbon that adjusts its color and transparency based on price action and trend strength.
Usage
The Fibonacci Ribbon is used to identify the prevailing market trend and potential reversal points. When the "EMA" component is above the "WMA" component, the ribbon turns green, indicating a bullish trend. Conversely, when the "EMA" is below the "WMA," the ribbon turns red, signifying a bearish trend.
The indicator also features dynamic transparency. The ribbon becomes more opaque as the trend strengthens. Strength is determined by several factors, including:
- Price position relative to the ribbon boundaries.
- Whether the ribbon is expanding (increasing span).
- The directional slope of the individual moving average lines.
Users can also enable an optional second ribbon with a different length (e.g., a longer-term trend filter) and choose to color the chart candles to match the ribbon's sentiment.
Details
The core logic of the script relies on a custom Fibonacci Moving Average (FMA) function. This function uses a summation of the length (similar to how Fibonacci sequences or triangular numbers are calculated) to weight price data.
- Non-Weighted FMA: Functions similarly to an EMA by applying weight from the back of the period.
- Weighted FMA: Functions similarly to a WMA by applying weight from the front of the period.
The interaction between these two weighted averages determines the ribbon width and color intensity, providing a more nuanced view of trend velocity than standard moving average crossovers.
Settings
- Length: The lookback period for the primary Fibonacci Ribbon calculations.
- Source: The price data used for the primary ribbon (e.g., Close, HL2).
- Color Candles: A toggle to apply the ribbon's color logic to the chart's bars/candles.
- Offset: Shifts the ribbon forward or backward on the horizontal axis.
- 2nd Ribbon?: Enables a secondary Fibonacci Ribbon on the chart.
- 2nd Length: The lookback period for the secondary ribbon.
- 2nd Source: The price data used for the secondary ribbon.
FAQ
How do I interpret the transparency of the Fibonacci Ribbon? A more solid, opaque color indicates a high-strength trend where price action, ribbon expansion, and slope are all aligned. A more transparent color indicates a weakening trend or potential consolidation.
Can I use this for long-term trend filtering? Yes, by enabling the "2nd Ribbon" and setting it to a higher length (e.g., 50 or 100), you can use the larger ribbon to determine the primary trend direction while using the smaller ribbon for entries.
How can I access the Fibonacci Ribbon? 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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.