OPEN-SOURCE SCRIPT

LETHINH-Swing pa,smc

163
🟦 📌 Title (English)

Swing High / Swing Low – 3-Candle Fractal (5-Bar Pivot) | Auto Alerts



🟩 📌 Short Description

A clean and reliable swing high / swing low detector based on the classic 3-candle (5-bar) fractal pivot. Automatically marks SH/SL and triggers alerts when a swing is confirmed. No repainting after confirmation.



🟧 📌 Full Description (for TradingView Publishing)

🔶 Swing High / Swing Low – 3-Candle Fractal (5-Bar Pivot)

This indicator identifies Swing Highs (SH) and Swing Lows (SL) using the classic 3-candle fractal pattern, also known as the 5-bar pivot.
It marks swing points only after full confirmation, making it highly reliable and suitable for structure-based trading.



🔶 📍 How It Works

A swing is confirmed when the center candle is higher (or lower) than the two candles on each side:

Swing High (SH)

high[2] > high[3], high[1], high[0]

Swing Low (SL)

low[2] < low[3], low[1], low[0]

The confirmation occurs after 2 right candles close, so the indicator does not repaint once a swing is identified.



🔶 📍 Key Features
• Detects clean and accurate swings
• Uses pure price action — no indicators, no lag
• Marks swing high (SH) and swing low (SL) directly on the chart
• Non-repainting after confirmation
• Works on all timeframes and all markets
• Extremely lightweight and fast
• Includes alert conditions for both SH and SL

Perfect for traders using:
• Market Structure (BOS / CHoCH)
• Order Blocks (OB)
• Smart Money Concepts (SMC)
• Liquidity hunts
• Wyckoff
• Support/Resistance
• Price Action entries



🔶 📍 Why This Indicator Is Useful

Swing points are the foundation of market structure.
Accurately detecting them helps traders:
• Identify trend shifts
• Spot BOS / CHoCH correctly
• Find key zones (OB, liquidity levels, supply/demand)
• Time entries more precisely
• Avoid fake structure breaks

This indicator ensures swings are plotted only when fully confirmed, reducing noise and confusion.



🔶 📍 Alerts

You can create alerts for both conditions:
• Swing High Confirmed
• Swing Low Confirmed

Recommended settings:
• Once per bar close
• Open-ended alert

With alerts enabled, TradingView will automatically notify you every time a new swing forms.



🔶 📍 No Repainting

Once a swing is confirmed and plotted, it will not change or disappear.
This makes the indicator reliable for real-time alerts and backtesting.



🔶 📍 Pine Script (v5)

Paste your indicator code here if you want it visible.
Or leave the code hidden if you are publishing as protected.



🔶 📍 Final Notes
• This indicator focuses on confirmation, not prediction
• It is designed for clean structure reading
• All markets supported: Forex, Crypto, Stocks, Indexes, Commodities
• Suitable for scalping, intraday, swing, and even higher-timeframe trading

If you find this tool helpful, feel free to give it a like and add it to your favorites ❤️
Your support helps me share more tools with the community!

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.