OPEN-SOURCE SCRIPT
Trap Candle (Trend H4 + RSI Filter)

🔍 Trap Candle (Trend H4 + RSI Filter)
Description:
The Trap Candle indicator is designed to identify a specific and powerful two-candle price action pattern that often signals a false breakout followed by a strong reversal. It combines pure price action with two objective filters to increase signal quality and trend alignment.
📊 Pattern Logic:
Bullish Trap: The current candle breaks the previous candle’s low, but closes above its high (and is bullish).
Bearish Trap: The current candle breaks the previous candle’s high, but closes below its low (and is bearish).
This pattern often reveals institutional traps or stop hunts before directional movement.
🧠 Trend Filter (H4):
Ensures long signals occur only when the H4 close is higher than the previous H4 close (uptrend).
Ensures short signals occur only in a H4 downtrend.
Designed to align intraday entries (M15, H1) with higher timeframe momentum.
💪 RSI Confirmation:
Includes a configurable RSI filter on the current timeframe.
Only long signals are shown when RSI is above a user-defined threshold (e.g. 55).
Only short signals are shown when RSI is below a user-defined threshold (e.g. 45).
⚙️ Key Features:
Full customization of RSI period and thresholds.
Clean, visual signal plotting on the chart (with “Trap L” or “Trap S” labels).
Built-in alerts for both long and short trap candle setups.
Perfect for traders who want to trade smart reversals with trend and momentum confirmation.
✅ Recommended Timeframes:
M15 and H1 (entry)
Uses H4 for trend bias
If you’re looking to filter out noise and spot only the highest quality reversal setups, the Trap Candle (Trend H4 + RSI Filter) is a solid tool for any price action-based strategy.
Description:
The Trap Candle indicator is designed to identify a specific and powerful two-candle price action pattern that often signals a false breakout followed by a strong reversal. It combines pure price action with two objective filters to increase signal quality and trend alignment.
📊 Pattern Logic:
Bullish Trap: The current candle breaks the previous candle’s low, but closes above its high (and is bullish).
Bearish Trap: The current candle breaks the previous candle’s high, but closes below its low (and is bearish).
This pattern often reveals institutional traps or stop hunts before directional movement.
🧠 Trend Filter (H4):
Ensures long signals occur only when the H4 close is higher than the previous H4 close (uptrend).
Ensures short signals occur only in a H4 downtrend.
Designed to align intraday entries (M15, H1) with higher timeframe momentum.
💪 RSI Confirmation:
Includes a configurable RSI filter on the current timeframe.
Only long signals are shown when RSI is above a user-defined threshold (e.g. 55).
Only short signals are shown when RSI is below a user-defined threshold (e.g. 45).
⚙️ Key Features:
Full customization of RSI period and thresholds.
Clean, visual signal plotting on the chart (with “Trap L” or “Trap S” labels).
Built-in alerts for both long and short trap candle setups.
Perfect for traders who want to trade smart reversals with trend and momentum confirmation.
✅ Recommended Timeframes:
M15 and H1 (entry)
Uses H4 for trend bias
If you’re looking to filter out noise and spot only the highest quality reversal setups, the Trap Candle (Trend H4 + RSI Filter) is a solid tool for any price action-based strategy.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.