OPEN-SOURCE SCRIPT
ที่อัปเดต: [MightyDok] Smart S/R Levels

Description (EN)
Automatically detects support/resistance zones using the Smart Combined method — Swing Point Clustering + Volume Profile Gap-Fill.
How it works:
1. Detects swing highs/lows (pivot points) over the lookback period
2. Clusters nearby swing points — more touches = stronger level
3. Adds period extremes (high/low) as additional levels
4. Merges zones that are too close together
5. Builds a Volume Profile and finds "gaps" — sharp volume transitions with no nearby swing level. Adds VP levels only in these gaps to fill blind spots
6. Draws zones labeled with touch count. Green = swing-based, blue = VP-based
Alerts: price enters zone, breakout up, breakout down — with level price and % move from zone center.
Adaptive window: for extreme price ranges (>200%), the swing detection window automatically narrows for finer level resolution.
---
Описание (RU)
Индикатор автоматически определяет зоны поддержки/сопротивления методом Smart Combined — комбинация Swing Point Clustering и Volume Profile Gap-Fill.
Как работает:
1. Находит точки разворота (swing highs/lows) за последние N баров
2. Группирует близкие точки в кластеры — чем больше касаний, тем сильнее уровень
3. Добавляет экстремумы периода (high/low) как дополнительные уровни
4. Мержит слишком близкие зоны
5. Строит Volume Profile и находит "пробелы" — места где объём резко меняется, но нет swing-уровней. Добавляет VP-уровни только в этих пробелах
6. Рисует зоны с указанием количества касаний. Зелёные = swing, синие = VP
Алерты: вход цены в зону, выход вверх (breakout up), выход вниз (breakout down) — с указанием цены уровня и % движения.
Адаптивное окно: при сильных движениях (>200%) окно swing detection автоматически уменьшается для более точных уровней.
Automatically detects support/resistance zones using the Smart Combined method — Swing Point Clustering + Volume Profile Gap-Fill.
How it works:
1. Detects swing highs/lows (pivot points) over the lookback period
2. Clusters nearby swing points — more touches = stronger level
3. Adds period extremes (high/low) as additional levels
4. Merges zones that are too close together
5. Builds a Volume Profile and finds "gaps" — sharp volume transitions with no nearby swing level. Adds VP levels only in these gaps to fill blind spots
6. Draws zones labeled with touch count. Green = swing-based, blue = VP-based
Alerts: price enters zone, breakout up, breakout down — with level price and % move from zone center.
Adaptive window: for extreme price ranges (>200%), the swing detection window automatically narrows for finer level resolution.
---
Описание (RU)
Индикатор автоматически определяет зоны поддержки/сопротивления методом Smart Combined — комбинация Swing Point Clustering и Volume Profile Gap-Fill.
Как работает:
1. Находит точки разворота (swing highs/lows) за последние N баров
2. Группирует близкие точки в кластеры — чем больше касаний, тем сильнее уровень
3. Добавляет экстремумы периода (high/low) как дополнительные уровни
4. Мержит слишком близкие зоны
5. Строит Volume Profile и находит "пробелы" — места где объём резко меняется, но нет swing-уровней. Добавляет VP-уровни только в этих пробелах
6. Рисует зоны с указанием количества касаний. Зелёные = swing, синие = VP
Алерты: вход цены в зону, выход вверх (breakout up), выход вниз (breakout down) — с указанием цены уровня и % движения.
Адаптивное окно: при сильных движениях (>200%) окно swing detection автоматически уменьшается для более точных уровней.
Release Note
Description (EN)Automatically detects support/resistance zones using the Smart Combined method — Swing Point Clustering + Volume Profile Gap-Fill.
How it works:
1. Detects swing highs/lows (pivot points) over the lookback period
2. Clusters nearby swing points — more touches = stronger level
3. Adds period extremes (high/low) as additional levels
4. Merges zones that are too close together
5. Builds a Volume Profile and finds "gaps" — sharp volume transitions with no nearby swing level. Adds VP levels only in these gaps to fill blind spots
6. Draws zones labeled with touch count. Green = swing-based, blue = VP-based
Alerts: price enters zone, breakout up, breakout down — with level price and % move from zone center.
Adaptive window: for extreme price ranges (>200%), the swing detection window automatically narrows for finer level resolution.
---
Описание (RU)
Индикатор автоматически определяет зоны поддержки/сопротивления методом Smart Combined — комбинация Swing Point Clustering и Volume Profile Gap-Fill.
Как работает:
1. Находит точки разворота (swing highs/lows) за последние N баров
2. Группирует близкие точки в кластеры — чем больше касаний, тем сильнее уровень
3. Добавляет экстремумы периода (high/low) как дополнительные уровни
4. Мержит слишком близкие зоны
5. Строит Volume Profile и находит "пробелы" — места где объём резко меняется, но нет swing-уровней. Добавляет VP-уровни только в этих пробелах
6. Рисует зоны с указанием количества касаний. Зелёные = swing, синие = VP
Алерты: вход цены в зону, выход вверх (breakout up), выход вниз (breakout down) — с указанием цены уровня и % движения.
Адаптивное окно: при сильных движениях (>200%) окно swing detection автоматически уменьшается для более точных уровней.
// v2.0 (2026-03-09)
// + Pine gap-fill: third detection layer — finds zones with high bar interaction
// in gaps where Swing and VP missed (orange zones)
// + Priority merge: replaces sequential merge to prevent cascading zone kills
// + Tooltips for all settings
// + Changelog and versioning
//
// v1.0 (2026-03-08)
// Initial release: Swing clustering + VP-Edge gap-fill
// Alerts: Price Enters Zone, Breakout Up, Breakout Down
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน