OPEN-SOURCE SCRIPT
Vùng đỉnh đáy chính theo phá vỡ (dùng line)

Indicator Name:
🔺 Key Swing Zones Based on Breakouts (Line-Based)
Short Description:
This indicator automatically detects and visualizes key swing highs and lows based on the principle of candle close breaking the wick of the previous candle, then classifies the current market trend as uptrend, downtrend, or neutral. It draws horizontal lines representing key zones and adds visual labels to help traders analyze market structure more clearly.
How It Works:
🔹 Reversal Signal Logic:
In an uptrend, if a candle closes below the previous candle's low, it marks a swing low.
In a downtrend, if a candle closes above the previous candle's high, it marks a swing high.
🔹 Structure Break Detection:
Price breaking above a key high → confirms an uptrend.
Price breaking below a key low → confirms a downtrend.
If price breaks a zone but doesn't form a new high/low → switches to neutral.
🔹 Visual Display:
Draws two horizontal lines: one at the key high, one at the key low.
Adds labels "Key High" or "Key Low" at the breakout points.
Zone color representation:
🟢 Green = Uptrend
🔴 Red = Downtrend
⚪ White = Neutral
🔺 Key Swing Zones Based on Breakouts (Line-Based)
Short Description:
This indicator automatically detects and visualizes key swing highs and lows based on the principle of candle close breaking the wick of the previous candle, then classifies the current market trend as uptrend, downtrend, or neutral. It draws horizontal lines representing key zones and adds visual labels to help traders analyze market structure more clearly.
How It Works:
🔹 Reversal Signal Logic:
In an uptrend, if a candle closes below the previous candle's low, it marks a swing low.
In a downtrend, if a candle closes above the previous candle's high, it marks a swing high.
🔹 Structure Break Detection:
Price breaking above a key high → confirms an uptrend.
Price breaking below a key low → confirms a downtrend.
If price breaks a zone but doesn't form a new high/low → switches to neutral.
🔹 Visual Display:
Draws two horizontal lines: one at the key high, one at the key low.
Adds labels "Key High" or "Key Low" at the breakout points.
Zone color representation:
🟢 Green = Uptrend
🔴 Red = Downtrend
⚪ White = Neutral
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.