OPEN-SOURCE SCRIPT
Aktualisiert TheStrat: Failed 2 + 2 Confirmation

TheStrat: Failed-2 + 2 Confirmation (2-2 option)
This indicator spots a classic Strat “failed 2 → 2” sequence on consecutive bars, and fires alerts only when both conditions are met:
Failed-2 bar on the prior candle
Failed 2-Down (F2D): Took the prior low but closed green
Failed 2-Up (F2U): Took the prior high but closed red
By default this is strict (excludes outside bars/3’s). You can toggle to allow 3’s if you prefer a looser definition.
Current bar is a clean “2”
2U = broke prior high only; 2D = broke prior low only (excludes 3’s).
Optional: Require flip so the second bar must reverse direction (F2D→2U for longs, F2U→2D for shorts). Turn this off if you want any 2 after a Failed-2.
What gets plotted
Tiny markers on each Failed-2 as they occur (F2U/F2D).
A label when the combo confirms on the next bar:
Bullish: F2D→2U (or F2D→2 if flip is off) below the bar
Bearish: F2U→2D (or F2U→2) above the bar
Alerts (set from the “Add Alert” dialog)
Failed2 + 2 (Bull): Prior bar was F2D; current bar is a 2 (flip optional).
Failed2 + 2 (Bear): Prior bar was F2U; current bar is a 2 (flip optional).
Inputs
Colors for Failed-2 markers and combo labels
Require flip (on by default) → focuses on true 2-2 reversals
Count outside bars (3) as Failed-2? (off by default) → stricter = fewer, cleaner signals
How to trade it (typical Strat style)
Bullish combo (F2D→2U): Entry on break of the combo bar’s high; risk under its low (or under the prior bar).
Bearish combo (F2U→2D): Entry on break of the combo bar’s low; risk above its high.
First target = prior pivot (“magnitude”), then nearby pivots/BF levels. Improve odds by aligning with time-frame continuity (e.g., day/week in your direction).
Notes / Best practices
Uses barstate.isconfirmed → signals/labels are based on closed bars to avoid repaint.
If you see too many Failed-2 tags, keep outside-bar counting OFF (strict mode).
This indicator spots a classic Strat “failed 2 → 2” sequence on consecutive bars, and fires alerts only when both conditions are met:
Failed-2 bar on the prior candle
Failed 2-Down (F2D): Took the prior low but closed green
Failed 2-Up (F2U): Took the prior high but closed red
By default this is strict (excludes outside bars/3’s). You can toggle to allow 3’s if you prefer a looser definition.
Current bar is a clean “2”
2U = broke prior high only; 2D = broke prior low only (excludes 3’s).
Optional: Require flip so the second bar must reverse direction (F2D→2U for longs, F2U→2D for shorts). Turn this off if you want any 2 after a Failed-2.
What gets plotted
Tiny markers on each Failed-2 as they occur (F2U/F2D).
A label when the combo confirms on the next bar:
Bullish: F2D→2U (or F2D→2 if flip is off) below the bar
Bearish: F2U→2D (or F2U→2) above the bar
Alerts (set from the “Add Alert” dialog)
Failed2 + 2 (Bull): Prior bar was F2D; current bar is a 2 (flip optional).
Failed2 + 2 (Bear): Prior bar was F2U; current bar is a 2 (flip optional).
Inputs
Colors for Failed-2 markers and combo labels
Require flip (on by default) → focuses on true 2-2 reversals
Count outside bars (3) as Failed-2? (off by default) → stricter = fewer, cleaner signals
How to trade it (typical Strat style)
Bullish combo (F2D→2U): Entry on break of the combo bar’s high; risk under its low (or under the prior bar).
Bearish combo (F2U→2D): Entry on break of the combo bar’s low; risk above its high.
First target = prior pivot (“magnitude”), then nearby pivots/BF levels. Improve odds by aligning with time-frame continuity (e.g., day/week in your direction).
Notes / Best practices
Uses barstate.isconfirmed → signals/labels are based on closed bars to avoid repaint.
If you see too many Failed-2 tags, keep outside-bar counting OFF (strict mode).
Versionshinweise
updated chartVersionshinweise
Updated script for intrabar alertsVersionshinweise
Updated color for alert icon within chart.Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.