OPEN-SOURCE SCRIPT
Price Action High 2 + Risk/Reward Visualizer

Introduction: Price Action High 2 (Bull Flag) Setup
This script identifies the High 2 (H2) setup, a staple price action pattern popularized by Al Brooks. The High 2 is a high-probability continuation pattern designed to catch the resumption of a bull trend after a two-legged pullback (a "complex" bull flag).
In a strong uptrend, the first attempt to end a pullback often fails (High 1). The High 2 represents the second, and usually more reliable, attempt by bulls to take control, often forming a "double bottom" structure within the flag.
How the Logic Works
The indicator follows a strict state-machine logic to ensure the pattern is valid:
Trend Confirmation: The script filters for an established uptrend where price is above a rising EMA (adjustable in settings).
Pullback Identification: It looks for a sequence of bars making lower highs.
High 1 (H1): The first bar in the correction that breaks above the high of the prior bar.
The Second Leg: The script then waits for the price to again fail to break a high, confirming a second leg of the pullback.
High 2 (H2): The signal is triggered when a bar breaks the high of the previous bar for the second time.
Key Features
Signal Bar Quality Filter: Not all High 2s are equal. This script includes a filter ensuring the signal bar closes in the upper portion of its range (bullish conviction) to avoid "weak" breakouts.
Automated Risk/Reward Visualizer: Upon a signal, the script automatically projects a Stop Loss (at the signal bar low) and a Take Profit level based on a customizable R:R ratio.
Clean Visuals: Labeled "H2" markers and dashed trend lines keep the chart uncluttered.
How to Trade It
Entry: Place a buy-stop order 1 tick above the High 2 signal bar.
Stop Loss: Traditionally placed below the low of the signal bar or the most recent swing low.
Target: Common targets include a 1:2 Risk/Reward ratio or the previous major swing high.
Settings Guide
EMA Length: Adjust this to match your timeframe (e.g., 20 for intraday, 50 for daily).
Min Close %: Set this to 50% or higher to ensure you only take trades where the bulls finished the bar strong.
Risk:Reward Ratio: Customize your profit targets to align with your personal trading plan.
This script identifies the High 2 (H2) setup, a staple price action pattern popularized by Al Brooks. The High 2 is a high-probability continuation pattern designed to catch the resumption of a bull trend after a two-legged pullback (a "complex" bull flag).
In a strong uptrend, the first attempt to end a pullback often fails (High 1). The High 2 represents the second, and usually more reliable, attempt by bulls to take control, often forming a "double bottom" structure within the flag.
How the Logic Works
The indicator follows a strict state-machine logic to ensure the pattern is valid:
Trend Confirmation: The script filters for an established uptrend where price is above a rising EMA (adjustable in settings).
Pullback Identification: It looks for a sequence of bars making lower highs.
High 1 (H1): The first bar in the correction that breaks above the high of the prior bar.
The Second Leg: The script then waits for the price to again fail to break a high, confirming a second leg of the pullback.
High 2 (H2): The signal is triggered when a bar breaks the high of the previous bar for the second time.
Key Features
Signal Bar Quality Filter: Not all High 2s are equal. This script includes a filter ensuring the signal bar closes in the upper portion of its range (bullish conviction) to avoid "weak" breakouts.
Automated Risk/Reward Visualizer: Upon a signal, the script automatically projects a Stop Loss (at the signal bar low) and a Take Profit level based on a customizable R:R ratio.
Clean Visuals: Labeled "H2" markers and dashed trend lines keep the chart uncluttered.
How to Trade It
Entry: Place a buy-stop order 1 tick above the High 2 signal bar.
Stop Loss: Traditionally placed below the low of the signal bar or the most recent swing low.
Target: Common targets include a 1:2 Risk/Reward ratio or the previous major swing high.
Settings Guide
EMA Length: Adjust this to match your timeframe (e.g., 20 for intraday, 50 for daily).
Min Close %: Set this to 50% or higher to ensure you only take trades where the bulls finished the bar strong.
Risk:Reward Ratio: Customize your profit targets to align with your personal trading plan.
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.