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.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.