PROTECTED SOURCE SCRIPT
Updated YUSUF DM

Smart liquidity-based supports and resistances,
t can adapt to the market and identify areas of peaks, troughs, and liquidity to draw support and resistance lines.
t can adapt to the market and identify areas of peaks, troughs, and liquidity to draw support and resistance lines.
Release Notes
What it doesDraws exactly one horizontal line at the most recently confirmed pivot—either the last swing High or the last swing Low—and extends it to the right. The line automatically updates when a newer pivot is confirmed.
Why it’s useful
Instantly highlights the nearest actionable level (recent resistance or support).
Reduces chart noise by showing only one key level instead of multiple lines.
Useful for breakout/mean-reversion decisions and stop/TP placement.
How it works
Uses ta.pivothigh / ta.pivotlow with user-defined left/right bars to confirm swings.
Compares timestamps of the latest confirmed high/low and keeps the newest.
Colors the line by type (e.g., red for highs, green for lows) and updates in real time.
Inputs
Pivot Left / Pivot Right: Swing sensitivity and confirmation delay.
High/Low Line Color: Visual customization.
Line Width & Style: Thickness and style (solid, dotted, dashed).
Best practices
Increase Left/Right values for more reliable pivots on higher timeframes.
Decrease them if you want faster, more sensitive updates on lower timeframes.
Combine with volume/structure to validate breakouts of the level.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.