Support and Resistance Lookback based
Sep 22, 2020

The Support and Resistance Lookback based indicator identifies key price levels by analyzing historical extremes over a user-defined lookback period to help traders spot potential reversal zones.
Usage
The Support and Resistance Lookback based tool is designed to highlight significant price ceilings (resistance) and floors (support) directly on the chart. Traders can use these levels to:
- Identify potential entry and exit points based on price reactions to historical highs and lows.
- Set stop-loss or take-profit targets around validated zones.
- Gauge market volatility by observing the distance and density of the formed levels.
The indicator plots circles at specific price levels whenever a new local high or low is confirmed. Resistance levels are typically colored red, while support levels are colored green. The sensitivity of these levels is controlled by the lookback and distance settings, allowing for either a broad or granular view of the market structure.
Details
The script functions by scanning a specific lookback window to find the highest and lowest price points. To ensure the levels are significant and not cluttered, it implements two primary filters:
- Confirmation Logic: It checks if the current price extreme is higher/lower than several preceding candles and if it has effectively "rolled over" or "bounced" from that peak/trough.
- Distance Filtering: The indicator calculates the average return of the asset to determine a dynamic minimum distance between levels. A new level will only be recorded if it is sufficiently far away from existing recent levels, preventing the chart from being overwhelmed by minor price fluctuations.
The rounding function ensures that levels are normalized, making them easier to read and more reflective of psychological price points.
Settings
Main Settings
- Support & Resistance Levels Source: Determines which price data is used to calculate levels (Close, High/Low, Highwick/Lowwick, or OHLC4).
- S&R Levels Loopback: The number of candles the script looks back to identify a local maximum or minimum.
- Distance Between S&R Levels: A multiplier that dictates how far a new level must be from existing levels to be plotted.
- S&R Max Levels: Limits the internal array size for level calculations.
- Sell Zone: A parameter used for internal calculation thresholds.
- Highlight Tops & Bottoms?: Toggles the visibility of specific breach highlights on the chart.
FAQ
How do I interpret the circles on the chart?
The circles represent historical price levels where the market found significant supply (red) or demand (green). When price approaches these levels again, it may experience resistance or support.
Can I change the sensitivity of the levels?
Yes, by increasing the "S&R Levels Loopback," the indicator will look for more significant, long-term levels. Decreasing it will show more frequent, short-term levels.
How can I access Support and Resistance Lookback based?
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.

