OPEN-SOURCE SCRIPT

STRAT 3-2-2 (30m) • Upcoming / Approach / Entry + Alerts

284
This indicator is built for The STRAT trading method, specifically the 3-2-2 reversal pattern. It monitors price action on the 30-minute timeframe (HTF = 30m) and visually/alert-wise highlights where a 3-2-2 setup, approach, or entry trigger occurs.


---

⚙️ How it works

1. Detects bar types:

3 (Outside Bar) = range breaks both high & low of the previous bar

2u (Up bar) = higher high, not outside

2d (Down bar) = lower low, not outside

1 (Inside bar) = fully contained within prior bar



2. Looks for 3-2-2 setups:

Bullish 3-2-2 = 3 → 2d → 2u (expect reversal UP)

Bearish 3-2-2 = 3 → 2u → 2d (expect reversal DOWN)



3. Defines trigger levels:

Bullish trigger = high of the first “2d” bar

Bearish trigger = low of the first “2u” bar



4. Signals 3 phases:

Upcoming: pattern is forming, second “2” hasn’t triggered yet

Approach: price comes within 50% (adjustable) of the trigger level

Entry: price breaks the trigger (actual reversal confirmation)



5. Visualization:

Labels above/below candles show “Approach” and “Entry”

Background or bar colors (toggle in settings) highlight Setup / Approach / Entry

Optional dotted line marks the trigger level for clarity





---

🔔 Alerts

Two alert systems are built in:

1. Safe static conditions (for normal TradingView alert setup):

APPROACH: Bullish 3-2-2 (30m)

APPROACH: Bearish 3-2-2 (30m)

ENTRY: Bullish 3-2-2 (30m)

ENTRY: Bearish 3-2-2 (30m)



2. Dynamic messages (using alert() calls with price info):

If you create an alert with “Any alert() function call”, the pop-up will include the trigger price.





---

📋 Inputs (Settings)

Signal timeframe (HTF) → default 30m

Confirm signals at HTF bar close → waits for bar close (non-repainting)

Approach = % of first '2' bar range → default 50%

Show labels → On/Off

Color candles instead of background → toggle between candle color vs. chart background

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.