OPEN-SOURCE SCRIPT
30 Min Pivot Enhanced

# 30 Min Pivot Enhanced
The **30 Min Pivot Enhanced** indicator detects pivot reversals and potential buy/sell signals on the 30-minute timeframe. It combines streak-based trend exhaustion with pivot breakouts and optional flush (capitulation) candle detection.
## Core Logic
- Trend streaks: pivots form after consecutive same-color candles (`trendLength`)
- Flush detection: oversized red candles (ATR based) flagged as potential exhaustion
- Pivot candidates:
- Bullish → after a red streak (or flush) followed by a green candle
- Bearish → after a green streak followed by a red candle
- Confirmation: price must break pivot high/low within `maxBarsAfterPivot`
## Inputs
- Consecutive Trend Candles → streak length required for pivot
- Maximum Bars After Pivot → confirmation window
- Show Pivot Lines → toggle pivot levels on chart
- Flush Detection → ATR-based capitulation detection
- Flush Lookback → how many bars to keep flush valid
- Enable Buy/Sell Alerts → toggle trade alerts
## Visuals
- Buy pivots → green "P Buy" labels under price
- Sell pivots → red pivot lines at lows (if enabled)
- Flush markers → optional debug labels showing capitulation bars
## Alerts
- Buy Alert → price breaks above pivot high
- Sell Alert → price breaks below pivot low
---
Best for traders watching **30-minute reversal plays**, especially where exhaustion or flush candles precede a breakout.
The **30 Min Pivot Enhanced** indicator detects pivot reversals and potential buy/sell signals on the 30-minute timeframe. It combines streak-based trend exhaustion with pivot breakouts and optional flush (capitulation) candle detection.
## Core Logic
- Trend streaks: pivots form after consecutive same-color candles (`trendLength`)
- Flush detection: oversized red candles (ATR based) flagged as potential exhaustion
- Pivot candidates:
- Bullish → after a red streak (or flush) followed by a green candle
- Bearish → after a green streak followed by a red candle
- Confirmation: price must break pivot high/low within `maxBarsAfterPivot`
## Inputs
- Consecutive Trend Candles → streak length required for pivot
- Maximum Bars After Pivot → confirmation window
- Show Pivot Lines → toggle pivot levels on chart
- Flush Detection → ATR-based capitulation detection
- Flush Lookback → how many bars to keep flush valid
- Enable Buy/Sell Alerts → toggle trade alerts
## Visuals
- Buy pivots → green "P Buy" labels under price
- Sell pivots → red pivot lines at lows (if enabled)
- Flush markers → optional debug labels showing capitulation bars
## Alerts
- Buy Alert → price breaks above pivot high
- Sell Alert → price breaks below pivot low
---
Best for traders watching **30-minute reversal plays**, especially where exhaustion or flush candles precede a breakout.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.