Range Filter Buy and Sell 5min - guikroth version

Dec 21, 2022

Static chart image
Signals
Moving Averages
Volatility

The Range Filter Buy and Sell 5min indicator provides a volatility-based trend filtering system designed to reduce market noise and identify high-probability trend reversals and continuations.

Usage

The Usage section describes how the script can be used to identify market trends and potential entry points. The indicator functions by gating price movements that do not exceed a specific volatility-adjusted range, allowing traders to focus on significant price action.

  • Trend Identification: The indicator colors the price bars and the central filter line based on the current trend. Green indicates a bullish trend, red indicates a bearish trend, and blue represents a neutral or transitioning state.
  • Buy and Sell Signals: "Buy" labels appear when the price crosses above the filter during an upward trend shift. "Sell" labels appear when the price crosses below the filter during a downward trend shift.
  • Breakout Detection: The High and Low Target bands act as dynamic support and resistance. Price breaking through these bands often signals a momentum breakout.
  • External Inputs: With Pine Script v5 compatibility, users can apply the Range Filter to other indicators. For example, instead of using price (close), you can select an EMA or VWAP as the "Source" to filter the trend of that specific moving average.

Details

The Range Filter Buy and Sell 5min is a refined version of the original Range Filter [DW] by DonovanWall, optimized for lower timeframes like the 5-minute chart.

The calculation process involves three main steps:

  1. Average Range Calculation: A smoothed average price range is determined using an EMA of the absolute price change over a specified sampling period.
  2. Range Gating: This average range is multiplied by the "Range Multiplier." The filter then tracks price movements only when they exceed this calculated volatility threshold, effectively ignoring minor fluctuations.
  3. Target Bands: High and Low target bands are projected around the filter line (Filter + Range and Filter - Range) to visualize the price levels required to trigger a change in the filter's direction.

Settings

  • Source: Determines the input data used for the filter calculations (default is Close, but can be set to other indicators like VWAP).
  • Sampling Period: Adjusts the lookback period used to calculate the average price range; higher values result in a smoother, slower-reacting filter.
  • Range Multiplier: Controls the sensitivity of the filter; a higher multiplier creates a wider range that filters out more noise but may result in later signals.

FAQ

How do I interpret the bar colors? The bar colors are synchronized with the trend: green bars suggest bullish momentum, red bars suggest bearish momentum, and blue bars indicate a neutral range where price has not significantly broken the filter.

Can I use this for automated alerts? Yes, the script includes built-in alert conditions for "Buy," "Sell," or a combined "Buy and Sell" alert that triggers whenever a new signal label appears on the chart.

How do I access the Range Filter Buy and Sell 5min? 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.