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
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.