OPEN-SOURCE SCRIPT

TedAlpha – Structure / FVG / OB

201
Sessions:
Only looks for trades when price is inside your defined London or NY time blocks.

CHOCH:
Uses pivots to track swing highs/lows, then flags a bullish CHOCH when structure flips from LL/LH to HH/HL, and vice versa for bearish.

FVG:
Detects 3-candle imbalance and keeps the zone “active” for fvgLookback bars, then checks if price trades back into it.

Order Blocks:
On a CHOCH, grabs the last opposite candle (bearish before bull CHOCH = bullish OB, bullish before bear CHOCH = bearish OB) and marks its body as the OB zone.

Signal:
A valid long = bull CHOCH + in session + (price inside bullish FVG and/or bullish OB, depending on toggles).
Short is the mirror image.

RR 1:3:
SL uses the last swing low (for longs) or last swing high (for shorts), TP is auto-set at 3× that distance and plotted as lines.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.