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.
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.