OPEN-SOURCE SCRIPT
byquan GP - Combined GP 1H+ ChiBao A Filter

// GP - Combined EMA Early Retest + SRSI Channel Filter
This script combines two complementary approaches into a filtered momentum and pullback retest system.
The core concept is to generate **high-probability entry signals** by requiring confirmation from both price action structure (via EMA pullback & early retest) and multi-timeframe momentum extremes (via SRSI Channel).
### Indicator A – EMA Early Retest Logic
This part identifies potential early retest entries after a strong move:
- Uses a triple EMA system (Fast 20 / Mid 50 / Slow 100 by default).
- Detects when the fast EMA crosses the mid or slow EMA, then tracks the subsequent pullback.
- Measures pullback depth as a percentage of the prior impulse move.
- Triggers a signal when price (via fast EMA) returns to an **early retest zone** (default 90% of the pullback), but only in the direction of the higher trend (Mid vs Slow EMA).
This logic aims to catch early resumption of the trend instead of waiting for a full retest of the swing low/high.
### Indicator B – Multi-Timeframe SRSI Channel
Provides higher-timeframe momentum context:
- Calculates Stochastic RSI (K+D) on open, high, low, and close.
- Aggregates values from **four higher timeframes** (default: 3H, 6H, 12H, 24H).
- Detects momentum extremes and confirms reversals after a set number of bars (default 10 bars confirmation).
- Acts as a powerful **momentum filter** to avoid signals against the broader momentum.
### Combined Filter System
The final signals are **filtered** using a 1-week lookback:
- A buy signal from the EMA Early Retest is only valid if the SRSI Channel has recently confirmed a momentum low (oversold reversal).
- A sell signal is only valid if the SRSI Channel has recently confirmed a momentum high (overbought reversal).
This filter significantly reduces false signals by ensuring that short-term price action aligns with broader momentum shifts.
### How to Use
**Bullish (Long) Signal:**
- Lime triangle appears below the bar.
- Indicates the fast EMA has pulled back and is retesting early in an uptrend, confirmed by recent multi-timeframe SRSI momentum low.
**Bearish (Short) Signal:**
- Red triangle appears above the bar.
- Indicates the fast EMA has pulled back and is retesting early in a downtrend, confirmed by recent multi-timeframe SRSI momentum high.
**Visual Elements:**
- Orange = Fast EMA (most responsive)
- Blue = Mid EMA
- Gray = Slow EMA (trend filter)
- Light triangles = Original EMA signals (filtered out)
- Bright triangles = **Filtered high-probability signals**
### Recommended Usage
- Best suited for **intraday and swing trading** on 5m, 15m, 30m, and 1H timeframes.
- Works well on major forex pairs, indices, and cryptocurrencies.
- Use in the direction of the higher timeframe trend for better performance.
- Combine with support/resistance, order blocks, or volume analysis for maximum edge.
### Settings Tips
- Adjust "Pullback depth (%)" and "Early retest ratio" to match market volatility.
- Modify higher timeframe settings in "Indicator B" group to suit your trading style.
- Increase "Confirm bars" for stricter (fewer but higher quality) signals.
This is **not** a simple mashup of indicators. The real value comes from the intelligent combination of **price structure (EMA retest)** with **multi-timeframe momentum confirmation**, plus the 1-week lookback filter.
The script is open-source and shared for educational purposes only. It is not financial advice — always use proper risk management and backtest thoroughly before using on a live account.
Feedback and suggestions are welcome!
This script combines two complementary approaches into a filtered momentum and pullback retest system.
The core concept is to generate **high-probability entry signals** by requiring confirmation from both price action structure (via EMA pullback & early retest) and multi-timeframe momentum extremes (via SRSI Channel).
### Indicator A – EMA Early Retest Logic
This part identifies potential early retest entries after a strong move:
- Uses a triple EMA system (Fast 20 / Mid 50 / Slow 100 by default).
- Detects when the fast EMA crosses the mid or slow EMA, then tracks the subsequent pullback.
- Measures pullback depth as a percentage of the prior impulse move.
- Triggers a signal when price (via fast EMA) returns to an **early retest zone** (default 90% of the pullback), but only in the direction of the higher trend (Mid vs Slow EMA).
This logic aims to catch early resumption of the trend instead of waiting for a full retest of the swing low/high.
### Indicator B – Multi-Timeframe SRSI Channel
Provides higher-timeframe momentum context:
- Calculates Stochastic RSI (K+D) on open, high, low, and close.
- Aggregates values from **four higher timeframes** (default: 3H, 6H, 12H, 24H).
- Detects momentum extremes and confirms reversals after a set number of bars (default 10 bars confirmation).
- Acts as a powerful **momentum filter** to avoid signals against the broader momentum.
### Combined Filter System
The final signals are **filtered** using a 1-week lookback:
- A buy signal from the EMA Early Retest is only valid if the SRSI Channel has recently confirmed a momentum low (oversold reversal).
- A sell signal is only valid if the SRSI Channel has recently confirmed a momentum high (overbought reversal).
This filter significantly reduces false signals by ensuring that short-term price action aligns with broader momentum shifts.
### How to Use
**Bullish (Long) Signal:**
- Lime triangle appears below the bar.
- Indicates the fast EMA has pulled back and is retesting early in an uptrend, confirmed by recent multi-timeframe SRSI momentum low.
**Bearish (Short) Signal:**
- Red triangle appears above the bar.
- Indicates the fast EMA has pulled back and is retesting early in a downtrend, confirmed by recent multi-timeframe SRSI momentum high.
**Visual Elements:**
- Orange = Fast EMA (most responsive)
- Blue = Mid EMA
- Gray = Slow EMA (trend filter)
- Light triangles = Original EMA signals (filtered out)
- Bright triangles = **Filtered high-probability signals**
### Recommended Usage
- Best suited for **intraday and swing trading** on 5m, 15m, 30m, and 1H timeframes.
- Works well on major forex pairs, indices, and cryptocurrencies.
- Use in the direction of the higher timeframe trend for better performance.
- Combine with support/resistance, order blocks, or volume analysis for maximum edge.
### Settings Tips
- Adjust "Pullback depth (%)" and "Early retest ratio" to match market volatility.
- Modify higher timeframe settings in "Indicator B" group to suit your trading style.
- Increase "Confirm bars" for stricter (fewer but higher quality) signals.
This is **not** a simple mashup of indicators. The real value comes from the intelligent combination of **price structure (EMA retest)** with **multi-timeframe momentum confirmation**, plus the 1-week lookback filter.
The script is open-source and shared for educational purposes only. It is not financial advice — always use proper risk management and backtest thoroughly before using on a live account.
Feedback and suggestions are welcome!
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。