Donchian Trend Ribbon
May 1, 2020

The Donchian Trend Ribbon indicator provides a multi-layered visual representation of trend momentum by analyzing price action across several Donchian Channel lookback periods simultaneously. This tool helps traders identify trend strength and potential reversals through a color-coded ribbon displayed in the indicator pane.
Usage
The Usage section describes how the script can be used to gauge market sentiment and trend persistence.
The indicator functions by evaluating a "main" trend based on a user-defined period and comparing it against nine shorter sub-periods. For example, if the primary period is set to 20, the ribbon will calculate trends for lengths 20, 19, 18, and so on, down to 11.
- Bullish Confirmation: When the price closes above the highest high of the previous periods, the ribbon turns green. A solid green ribbon indicates that both the main trend and the shorter lookback periods are in alignment, signaling strong bullish momentum.
- Bearish Confirmation: When the price closes below the lowest low of the previous periods, the ribbon turns red. A solid red ribbon indicates that both the main trend and the shorter sub-periods are in alignment, signaling strong bearish momentum.
- Trend Weakening: If the colors within the ribbon appear faded or inconsistent, it suggests that the shorter-term price action is no longer in alignment with the primary trend, which may foreshadow a potential reversal or period of consolidation.
Details
The Donchian Trend Ribbon is built upon the logic of Donchian Channels, which track the highest highs and lowest lows over a specific window. A trend change is triggered when a bar closes outside the previous channel boundaries (a close above the previous high signals an uptrend, while a close below the previous low signals a downtrend).
The ribbon construction uses ten distinct layers. The first layer represents the main period, while each subsequent layer uses a lookback period reduced by one (Main - 1, Main - 2, etc.). This hierarchical approach allows the indicator to visualize "trend confluence." Because the script evaluates price action relative to previous highs and lows without repainting, the signals remain fixed once a candle closes.
Settings
- Donchian Channel Period: Determines the lookback length for the primary trend calculation. This value also serves as the baseline for the nine additional sub-lengths (default is 20, minimum is 10).
FAQ
How do I interpret the different shades in the ribbon? The darkest colors represent full alignment between the main trend and the specific sub-period. Faded colors indicate that while the main trend is still active, that specific shorter-term period has not yet aligned or has started to deviate.
Can this indicator be used for entry and exit signals? Yes, traders often use the initial color flip of the entire ribbon as a trend entry signal. However, because entry points can also represent the peak of a move, it is recommended to use stop-loss levels or secondary confirmation indicators.
How do I access the Donchian Trend Ribbon? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

