OPEN-SOURCE SCRIPT

Lucy โ€“ 3-Bar Reversal with EMA50 Trend Filter

43
๐Ÿ“› Lucy โ€“ 3-Bar Reversal with EMA50 Trend Filter

Purpose:
To detect and highlight bullish and bearish 3-bar reversal patterns on the chart, but only when they align with the dominant trend, defined by the EMA 50.

โœ… How It Works
๐ŸŸข Bullish 3-Bar Reversal (Buy Setup):
Bar 1 is bearish (close < open)

Bar 2 makes a lower low than Bar 1

Bar 3 is bullish (close > open) and closes above Bar 2โ€™s high

Price must be above EMA 50 (trend filter)

โœ… Result: Shows a green triangle below the bar

๐Ÿ”ด Bearish 3-Bar Reversal (Sell Setup):
Bar 1 is bullish (close > open)

Bar 2 makes a higher high than Bar 1

Bar 3 is bearish (close < open) and closes below Bar 2โ€™s low

Price must be below EMA 50

โœ… Result: Shows a red triangle above the bar

๐Ÿ“Š What It Plots:
๐Ÿ”ผ Green triangle below bullish signal bar

๐Ÿ”ฝ Red triangle above bearish signal bar

๐ŸŸ  Orange line = EMA50 (trend filter)

๐Ÿ”” Built-in Alerts:
Youโ€™ll get an alert if:

A bullish reversal pattern forms above EMA50

A bearish reversal pattern forms below EMA50

๐Ÿง  Use Cases:
Great for trend-following traders who want clean, price-action entries

Works well on intraday (15m/1h) or swing (4h/daily) timeframes

Can be used for manual entries, or converted to strategy for automation

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.