OPEN-SOURCE SCRIPT
H/L Swings/pivots detector

This indicator detects and labels swing highs and swing lows using pivot logic.
It highlights market structure shifts by identifying:
- Higher Highs (HH) and Lower Highs (LH)
- Lower Lows (LL) and Higher Lows (HL)
Traders often use these levels to analyze trends, reversals, and key support/resistance zones.
The script also plots pivot markers above highs and below lows for visual clarity.
This tool is designed for educational and analytical purposes, and it does not provide financial advice or guaranteed results.
📂 Categories (choose when publishing)
Type of script → Indicator
Category → Trend Analysis (fits best for HH/LL pivots)
Optionally → Support/Resistance (if you emphasize pivots as zones)
swing high
swing low
pivot points
market structure
trend analysis
higher high
lower low
support resistance
It highlights market structure shifts by identifying:
- Higher Highs (HH) and Lower Highs (LH)
- Lower Lows (LL) and Higher Lows (HL)
Traders often use these levels to analyze trends, reversals, and key support/resistance zones.
The script also plots pivot markers above highs and below lows for visual clarity.
This tool is designed for educational and analytical purposes, and it does not provide financial advice or guaranteed results.
📂 Categories (choose when publishing)
Type of script → Indicator
Category → Trend Analysis (fits best for HH/LL pivots)
Optionally → Support/Resistance (if you emphasize pivots as zones)
swing high
swing low
pivot points
market structure
trend analysis
higher high
lower low
support resistance
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.