Support & Resistance
Oct 5, 2018

The Support & Resistance indicator identifies significant swing highs and lows in historical price action to project horizontal levels that may serve as future support or resistance.
Usage
The indicator is designed to help traders visualize key areas where price has historically reversed. By default, it tracks the most recent significant swing points (pivots) and displays them as horizontal lines on the chart.
- Identifying Levels: The script plots lines based on historical highs and lows. These levels can be used to identify potential breakout points or areas where price might stall.
- Trend Context: The levels are color-coded based on the current price relationship. If the current price is above a level, it is colored green (acting as potential support); if below, it is colored red (acting as potential resistance).
- Breakout Alerts: The tool includes built-in alerts for when price crosses specific major levels, allowing users to react to potential market shifts.
Details
The script utilizes the ta.pivothigh() and ta.pivotlow() functions to detect market turning points. It calculates two types of levels:
- Quick Levels: Based on a smaller "Right Bars" lookback for more immediate, recent pivots.
- Standard Levels: Based on a larger lookback period to capture more significant historical structural points.
The indicator displays multiple tiers of these pivots, including the most recent "Quick" pivots and the three most recent standard swing highs and lows. This provides a comprehensive view of both short-term and medium-term price structure.
Settings
- Left Bars: The number of bars required to the left of a high or low to confirm a pivot point.
- Right Bars: The number of bars required to the right of a high or low to confirm a standard pivot point.
- Quick Right Bars: The number of bars required to the right to confirm a "Quick" pivot point, resulting in faster detection of recent levels.
FAQ
How do I use the Support & Resistance levels?
These levels represent historical price extremes. Traders often look for price to bounce off these levels or for a strong "break and retest" pattern to confirm a trend continuation.
Why do some lines change color?
The lines change color dynamically: green indicates the current price is above the level, while red indicates the price is below it.
How can I access this tool?
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.

