INVITE-ONLY SCRIPT

Fractal Reversal Tracker

15
This script establishes a multi-timeframe breakout and fakeout validation system, designed for structural reversal, continuation, and false breakout detection. It leverages higher timeframe (HTF) candles to define structural levels, while using lower timeframe (LTF) data to validate the legitimacy of breakouts with fine-grained logic. At the core of the system is a mechanism that evaluates the breakout status once per closed HTF candle and stores the result in a boolean array breakout_flags, allowing for seamless state tracking without violating Pine Script's restrictions on global variable modification within functions.

For breakout detection, the script identifies classic continuation patterns—specifically, when the HTF candle closes above the previous high or below the previous low. If continuation conditions are not met, it evaluates for fakeouts (fake_up or fake_down) using detailed LTF logic. This includes tracking the LTF candle that caused the HTF high or low, identifying the first impulsive candle (bullish or bearish), and checking whether the close of the pullback candle is later violated by price. Only when these strict criteria are met is a fakeout confirmed.

Instead of relying on global boolean flags, the script stores the latest breakout status in a single-entry boolean array (breakout_flags), which is cleared and updated at each new HTF candle. This ensures clean and consistent breakout tracking while avoiding conflicts with Pine Script's scope limitations. Visually, the script draws HTF candle structures, breakout lines, and extended fakeout lines on the chart. When a confirmed, non-fake breakout occurs, it also draws an extended opening line on the LTF chart. Altogether, this system provides structural clarity and trade-level confirmation for breakout and reversal strategies.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน