Trend-reversal
May 25, 2019

The Trend-reversal indicator is a trend identification tool that utilizes trailing stop levels and dynamic volatility bands to detect potential trend shifts and momentum exhaustion. It aims to provide traders with clear visual zones for bullish and bearish regimes while highlighting specific levels where price power may be waning or reversing.
Usage
The indicator classifies market conditions into two primary zones:
- Bullish Zone (Blue Background): Occurs when the price is trading above the blue Trend Stop Line (TSL). Within this zone, the red line acts as a dynamic upper boundary. If price fails to maintain its position relative to the red line or begins to drop away from it, it may indicate a loss of momentum or a potential "sell point" within the broader uptrend.
- Bearish Zone (Red Background): Occurs when the price is trading below the blue Trend Stop Line. In this regime, the red line serves as a resistance level. A breakout above this red line during a bearish period is often interpreted as a "buy point" or an early signal that the trend is reversing to the upside.
The gray line represents the average of a Donchian Channel, serving as a baseline for price mean reversion and volatility tracking.
Details
The script calculates its primary levels based on a user-defined timeframe parameter, which defaults to 1440 (representing a daily trailing line on lower timeframes). It determines market direction by comparing the current close to the highest highs and lowest lows over a calculated period.
The Trend Stop Line (TSL) adjusts based on whether the market is making new structural highs or lows. When the price crosses this line, the indicator signals a trend reversal. The secondary red line is derived from a nested high-low calculation (highest lowest low/lowest highest high), providing a more sensitive boundary for identifying specific entry and exit triggers within the dominant trend.
Credit for the original logic and concept goes to Ceyhun.
Settings
- Timeframe: Adjusts the lookback period used for the calculations. By default, it is set to 1440 minutes to mimic daily trend levels on intraday charts. Increasing this value will make the indicator less sensitive to minor price fluctuations, while decreasing it will make it more reactive.
FAQ
How do I interpret the background colors?
The blue background indicates a prevailing bullish trend where the price is holding above the trailing stop line. The red background indicates a bearish trend where price is below the stop line.
What does the red line signify compared to the blue line?
The blue line (TSL) defines the overall trend direction. The red line is a more sensitive dynamic level used to spot specific exhaustion points (sell signals in an uptrend) or breakout points (buy signals in a downtrend).
How can I access the Trend-reversal indicator?
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.

