OPEN-SOURCE SCRIPT
Smart Impulse Exhaustion Finder (ATR + ADX Filter)

📌 Purpose
This indicator detects potential exhaustion of strong bullish or bearish impulses at fresh swing highs/lows by combining multiple price action and volatility-based filters.
🧠 How It Works
A signal is triggered only when all core conditions are satisfied:
1. Swing High/Low Detection
Current high (or low) must be the highest (or lowest) over the last Extremum Lookback bars (default: 50).
This ensures the move is significant relative to recent price action.
2. Impulse Confirmation
Price must extend by at least 1 × ATR from the previous swing point.
This filters out minor fluctuations.
3. Exhaustion Conditions (at least 2 out of 3 must be met)
RSI Extreme: RSI > Overbought Level (default: 80) for bearish signals, RSI < Oversold Level (default: 20) for bullish signals.
Volume Spike: Volume > SMA(Volume, Volume SMA Length) × Volume Spike Multiplier.
Candle Wick Rejection: Upper wick ≥ Wick Threshold % for bearish setups, Lower wick ≥ Wick Threshold % for bullish setups.
4. Trend Filter
ADX > ADX Threshold ensures the market is trending and filters out sideways conditions.
5. Candle Body Filter
Candle body must be ≥ Body Size ATR Factor × ATR.
This avoids weak signals from small candles or doji formations.
📈 How to Use
Bearish Signal:
Appears at fresh swing highs with exhaustion conditions met. Useful for tightening stops, taking partial profits, or counter-trend shorts.
Bullish Signal:
Appears at fresh swing lows with exhaustion conditions met. Useful for trailing stops, profit-taking, or counter-trend longs.
Recommended Timeframes: Works best on 1h, 4h, and Daily charts.
Markets: Crypto, Forex, Stocks — wherever volatility and trends are present.
⚙️ Inputs
RSI Length / Overbought / Oversold
Volume SMA Length & Volume Spike Multiplier
Wick Threshold %
Extremum Lookback (bars for highs/lows)
ADX Length & Threshold
Body Size ATR Factor
⚠️ Disclaimer
This script is for educational purposes only and does not constitute financial advice.
Always test thoroughly and apply proper risk management before live trading.
💡 Tip: Combine this tool with your own market context and confluence factors for higher probability setups.
This indicator detects potential exhaustion of strong bullish or bearish impulses at fresh swing highs/lows by combining multiple price action and volatility-based filters.
🧠 How It Works
A signal is triggered only when all core conditions are satisfied:
1. Swing High/Low Detection
Current high (or low) must be the highest (or lowest) over the last Extremum Lookback bars (default: 50).
This ensures the move is significant relative to recent price action.
2. Impulse Confirmation
Price must extend by at least 1 × ATR from the previous swing point.
This filters out minor fluctuations.
3. Exhaustion Conditions (at least 2 out of 3 must be met)
RSI Extreme: RSI > Overbought Level (default: 80) for bearish signals, RSI < Oversold Level (default: 20) for bullish signals.
Volume Spike: Volume > SMA(Volume, Volume SMA Length) × Volume Spike Multiplier.
Candle Wick Rejection: Upper wick ≥ Wick Threshold % for bearish setups, Lower wick ≥ Wick Threshold % for bullish setups.
4. Trend Filter
ADX > ADX Threshold ensures the market is trending and filters out sideways conditions.
5. Candle Body Filter
Candle body must be ≥ Body Size ATR Factor × ATR.
This avoids weak signals from small candles or doji formations.
📈 How to Use
Bearish Signal:
Appears at fresh swing highs with exhaustion conditions met. Useful for tightening stops, taking partial profits, or counter-trend shorts.
Bullish Signal:
Appears at fresh swing lows with exhaustion conditions met. Useful for trailing stops, profit-taking, or counter-trend longs.
Recommended Timeframes: Works best on 1h, 4h, and Daily charts.
Markets: Crypto, Forex, Stocks — wherever volatility and trends are present.
⚙️ Inputs
RSI Length / Overbought / Oversold
Volume SMA Length & Volume Spike Multiplier
Wick Threshold %
Extremum Lookback (bars for highs/lows)
ADX Length & Threshold
Body Size ATR Factor
⚠️ Disclaimer
This script is for educational purposes only and does not constitute financial advice.
Always test thoroughly and apply proper risk management before live trading.
💡 Tip: Combine this tool with your own market context and confluence factors for higher probability setups.
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.