OPEN-SOURCE SCRIPT
The Holy Grail

Holy Grail – Trend Pullback Framework
The Holy Grail indicator is inspired by the pullback method described by Larry Connors and Linda Raschke in the book Street Smarts.
The indicator is designed to identify structured pullbacks inside an established trend.
It combines three common elements used in trend-following approaches:
The objective is not to predict turning points. The indicator highlights moments where price retraces inside a dominant trend.
Trend structure
The trend is defined using two exponential moving averages:
When EMA 20 is above EMA 50 the environment is considered bullish.
When EMA 20 is below EMA 50 the environment is considered bearish.
A visual cloud between the two averages helps identify the dominant regime.
Trend strength filter (ADX)
An optional ADX filter can be enabled.
When active, signals are considered valid only if ADX is above the selected threshold. This helps avoid signals during weak or sideways conditions.
The chart background highlights periods where the ADX condition is satisfied.
Pullback detection
A setup appears when price retraces toward the fast average.
Bullish setup
Bearish setup
These conditions are marked with small circular markers.
Entry trigger
The entry occurs on the next candle if price breaks the high or low of the setup candle.
Triangles mark the trigger signals.
Williams Fractals
Optional Williams fractals highlight recent swing highs and lows.
These levels can help identify:
Important notes
Users should combine the signals with their own risk management and execution rules.
The Holy Grail indicator is inspired by the pullback method described by Larry Connors and Linda Raschke in the book Street Smarts.
The indicator is designed to identify structured pullbacks inside an established trend.
It combines three common elements used in trend-following approaches:
- Trend definition with moving averages
- Trend strength with ADX
- Pullback confirmation using price action
The objective is not to predict turning points. The indicator highlights moments where price retraces inside a dominant trend.
Trend structure
The trend is defined using two exponential moving averages:
- EMA 20 – short-term pullback reference
- EMA 50 – structural trend reference
When EMA 20 is above EMA 50 the environment is considered bullish.
When EMA 20 is below EMA 50 the environment is considered bearish.
A visual cloud between the two averages helps identify the dominant regime.
Trend strength filter (ADX)
An optional ADX filter can be enabled.
When active, signals are considered valid only if ADX is above the selected threshold. This helps avoid signals during weak or sideways conditions.
The chart background highlights periods where the ADX condition is satisfied.
Pullback detection
A setup appears when price retraces toward the fast average.
Bullish setup
- EMA 20 above EMA 50
- Price retraces toward EMA 20
- Price remains above EMA 50
Bearish setup
- EMA 20 below EMA 50
- Price retraces toward EMA 20
- Price remains below EMA 50
These conditions are marked with small circular markers.
Circles indicate a setup candle. The setup represents the pullback bar that meets the method conditions.
Triangles indicate the trigger candle, meaning price has broken the high or the low of the setup candle.
Entry trigger
The entry occurs on the next candle if price breaks the high or low of the setup candle.
- Bullish entry: price breaks the previous candle high
- Bearish entry: price breaks the previous candle low
Triangles mark the trigger signals.
Williams Fractals
Optional Williams fractals highlight recent swing highs and lows.
These levels can help identify:
- Potential stop locations
- Recent structural pivots
- Nearby breakout levels
Important notes
This indicator highlights structural market conditions, not guaranteed outcomes.
Trend strategies work best during directional markets. Sideways periods can produce noise and false signals.
The tool is designed to provide a consistent framework for identifying pullbacks inside trends.
Users should combine the signals with their own risk management and execution rules.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.