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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.