Support and Resistance: Triangles
Sep 30, 2023

The Support and Resistance: Triangles indicator identifies key market levels by constructing geometric triangle formations based on historical price extremes. By calculating the relationship between two peaks or troughs within a specified lookback period, the tool derives predictive support and resistance zones from the triangle's apex and base.
Usage
This tool can be used to identify potential rejection points and trend stabilization zones. The indicator plots horizontal levels derived from either Upwards or Downwards triangles.
- Support & Resistance Identification: In an Upwards Triangle, the midpoint (tip) typically acts as resistance while the base acts as support. For a Downwards Triangle, the midpoint (tip) acts as support while the base acts as resistance.
- Dynamic Level Updates: The indicator maintains only one active Upward and Downward triangle at a time. When a new valid formation is detected, the support and resistance levels shift to the new geometry.
- Long-term Filtering: By increasing the "Min Distance" and "Lookback Distance," users can filter for larger, more significant triangle formations that may hold better as long-term structural levels.
Details
The script uses specific geometric ratios to determine the "tip" of the triangle. By identifying two price points (highs for downward triangles, lows for upward triangles) that fall within a certain deviation of each other, it constructs an isosceles or equilateral triangle. The height of this triangle is determined by the "Bar Percent Increase" setting, which mimics natural ratios often found in technical analysis tools like Fibonacci retracements. Even after the visual lines of the triangles disappear due to platform plotting limits, the derived support and resistance levels remain on the chart to provide historical context.
Settings
Main Settings
- Show Triangles: Toggles the visibility of the geometric triangle lines on the chart.
- Triangle Zones: Determines which types of triangles to calculate (Upwards, Downwards, Both, or Neither).
- Max Deviation Allowed: Sets the maximum percentage difference allowed between two price points to qualify them as part of a triangle base.
- Lookback Distance: Defines how many bars the script searches to find a matching price point for the triangle base.
- Min Distance: Sets the minimum number of bars required between the two base points to ensure the triangle has sufficient width.
- Bar Percent Increase: A multiplier applied to the triangle height based on the horizontal spacing. A value of 0.005 approximates an equilateral triangle.
FAQ
How do I access Support and Resistance: Triangles?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Why do the triangles disappear but the dots remain?
TradingView has limits on the number of active line drawings. When new triangles are formed, older lines are removed to stay within these limits, but the support and resistance levels (plotted as circles) remain visible for historical reference.
What is the best way to make levels more significant?
To find more significant structural levels, increase the Min Distance and Lookback Distance. This forces the indicator to look for price points that are further apart, representing larger market cycles.
Unlock Unlimited Access to the LuxAlgo Library
Upgrade your plan to get all indicators, strategies, charts, and full access to Quant, our AI agent.
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.

