ATR Structure Trail Pro & Range Filter (v6)

Feb 6, 2026

Static chart image
Price Action Based
Signals
Pivot Based (Retrospective)
Trailing-Stop
Volatility

The ATR Structure Trail Pro & Range Filter (v6) indicator is a multi-purpose trend-following and consolidation detection tool designed to identify structural market shifts and volatility-based trend directions. It streamlines price action analysis by combining pivot-based structure flips with a dynamic trailing stop and automated range detection.

Usage

The Usage section describes how the script can be used to interpret market context. It is primarily used to distinguish between trending environments and consolidation phases.

  • Trend Direction: Use the ATR trailing line to determine the current market bias. A green line indicates a bullish trend, while a red line indicates a bearish trend.
  • Structural Flips: Look for the green and red arrows which highlight shifts in market structure (e.g., Higher Highs or Lower Lows). These serve as visual markers for potential trend reversals or continuations.
  • Range Filtering: The indicator automatically draws boxes when it detects tight consolidation. Blue or purple boxes signify "no-trade" zones where price action is sideways, helping users avoid choppy market conditions.
  • HTF Alignment: By utilizing the "Signal Timeframe" setting, users can project Higher Timeframe (HTF) trends and structure onto their current chart for multi-timeframe alignment.

Details

The script operates using three core logic components:

  1. Pivot Detection: It monitors Pivot Highs and Pivot Lows over a user-defined length. A "flip" occurs when price closes above a previous pivot high or below a previous pivot low.
  2. Volatility Trailing: The trailing stop is calculated using the Average True Range (ATR). It remains below price during uptrends and above price during downtrends, only flipping when price closes on the opposite side.
  3. Range Calculation: Consolidation is identified by comparing the recent price range (High to Low over a specific period) against a multiple of the ATR. If the range is narrower than the volatility-adjusted threshold, a consolidation box is initiated.

Settings

ATR Settings

  • ATR Length: Sets the lookback period for the Average True Range calculation.
  • ATR Multiplier (Trail): Determines the distance of the trailing stop from the price.

Structure & Logic

  • Structure Pivot Len: The number of bars required on either side to confirm a pivot point.
  • Signals After Bar Close: When enabled, signals are only confirmed once the candle closes to prevent intrabar repainting.
  • Signal Timeframe (HTF): Allows the user to select a different timeframe for the calculations.

Range Detection

  • Top Range Detect Bars: The lookback window used to calculate the recent high-low range for consolidation detection.
  • Range Width (<= xATR): The threshold multiplier; if the range is tighter than this value times ATR, a range box appears.

Visuals

  • Show Trade Boxes: Toggles the visibility of expansion/trend boxes.
  • Show RANGE Box: Toggles the visibility of consolidation boxes.
  • Colors/Transparency: Various settings to customize the appearance of the trail line, box fills, and borders.

FAQ

How do I interpret the colored arrows? The arrows represent structural flips based on pivot points. A green arrow indicates a break of a previous high, while a red arrow indicates a break of a previous low, signaling a shift in market context.

What does it mean when a blue or purple box appears? These boxes indicate that the market has entered a range-bound or consolidation phase based on volatility. Traders often use these to avoid entering new positions until a breakout occurs.

How can I access this indicator? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free access on the following platforms
tradingviewSymbolTradingView
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

ninjatraderNinjaTrader
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

metatrader4MetaTrader 4/5
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

thinkorswimThinkorswim
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

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.