OPEN-SOURCE SCRIPT
Lucy โ 3-Bar Reversal with EMA50 Trend Filter

๐ 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
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
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.