OPEN-SOURCE SCRIPT

Pullback Candle (Bullish & Bearish, No EMA)

395
🔍 Purpose
This indicator detects simple pullback reversal patterns based on price action and swing highs/lows — without any moving average or trend filters.

It highlights:

Bullish pullbacks (potential bounce/long setups)

Bearish pullbacks (potential rejection/short setups)

📈 Bullish Pullback Criteria
Three-bar pattern:

Bar 3: Highest close

Bar 2: Lower close

Bar 1: Even lower close

Current bar closes above previous bar (bullish reversal)

One of the last two candles is the lowest low of the past 6 bars (swing low)

📍 Result: A small green cross is plotted below the bar, and the bar is colored green.

📉 Bearish Pullback Criteria
Three-bar pattern:

Bar 3: Lowest close

Bar 2: Higher close

Bar 1: Even higher close

Current bar closes below previous bar (bearish reversal)

One of the last two candles is the highest high of the past 10 bars (swing high)

📍 Result: A small red cross is plotted above the bar, and the bar is colored red.

🔔 Alerts
One alert condition each for bullish and bearish pullback detection.

Can be used to trigger TradingView alerts.

🛠️ Customization
No inputs — fully automated logic

Clean, minimal, and fast

Can be extended with labels, alert sounds, or signals

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.