Dynamic Trendlines & Breakouts
Mar 9, 2026

The Dynamic Trendlines & Breakouts indicator provides an automated solution for structural analysis by mapping pivot-based trendlines and identifying high-probability breakouts using a volume-based filtering system.
Usage
The script is designed for momentum and breakout traders who want to identify key structural boundaries without manual drawing.
- Trendline Identification: The indicator automatically draws dashed resistance (upper) and support (lower) lines by connecting recent pivot points.
- Breakout Labels: "B" (Buy) or "S" (Sell) labels appear when the price closes beyond a trendline. If volume confirmation is enabled, these labels only trigger when the breakout occurs on above-average volume.
- HUD Dashboard: An on-chart panel provides real-time information:
- Last Breakout: Displays the current structural bias (Bullish/Bearish).
- AI Suggestion: Categorizes the current state as "LONG", "SHORT", or "Dangerous".
- Proximity Logic: When the price is within 0.5 ATR of a trendline, the suggestion changes to "Dangerous," signaling that the price is actively testing a boundary and a reversal or breakout is imminent.
Details
The indicator utilizes two algorithmic pillars to ensure accuracy:
- Dynamic Coordinate Mapping: By using
ta.pivothighandta.pivotlow, the script identifies historical pivot points based on the user-defined sensitivity. It maintains a memory of the two most recent pivots to construct lines that represent the current market geometry. - Volume Confirmation Engine: To mitigate "fakeouts" common in retail trading, the script evaluates the volume of the breakout candle against a 20-period Simple Moving Average (SMA). A breakout is only considered valid if the volume exceeds this average, indicating institutional participation.
Settings
⚙️ Trend Algorithm Settings
- Pivot Sensitivity (Lookback): Adjusts how far back the script looks for pivot points. Lower values capture micro-trends, while higher values identify major structural levels.
- Require Volume Confirmation?: Toggles the volume filter. When enabled, breakouts must be accompanied by above-average volume to trigger labels.
🎨 Theme & Dashboard
- Bullish Breakout Color: Sets the color for the "B" label and the support trendline.
- Bearish Breakout Color: Sets the color for the "S" label and the resistance trendline.
- Neutral / Accent Color: Sets the color for the dashboard's secondary text.
📊 HUD Dashboard Settings
- Show Dashboard?: Toggles the visibility of the on-chart information panel.
- Dashboard Position: Selects the corner or side of the chart where the dashboard is displayed.
- Dashboard Text Size: Adjusts the scaling of the dashboard text elements.
FAQ
How do I access Dynamic Trendlines & Breakouts?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What does the "Dangerous" status mean on the dashboard?
It indicates that the price is currently testing a trendline (within 0.5 ATR). This is a high-risk zone where price might bounce or break, making it an ideal time to wait for confirmation rather than entering a trade.
Can I use this for scalping?
Yes, by lowering the "Pivot Sensitivity" setting, the indicator will detect more frequent, short-term trends suitable for lower timeframes and scalping strategies.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.