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.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.