OPEN-SOURCE SCRIPT

Lucy – 3-Bar Reversal with EMA50 Trend Filter

63
📛 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

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.