OPEN-SOURCE SCRIPT

26 EMA Reversal Logic

49
This indicator identifies two distinct price behaviours on the daily charts of SPY, SPX, QQQ, or IXIC, using the 26-period EMA as a reference. It plots one signal per downtrend — either a yellow circle (bearish continuation) or a green circle (bullish reversal) — and locks further signals until price closes above the 26 EMA.

The yellow circles are when we close below the 26-day EMA and the next day we make a lower low.
The green circles are when we close below the 26-day EMA and the next day we actually open higher and that low is never revisited.

Symbol Restriction
Only works on: SPY, SPX, QQQ, IXIC
On any other symbol, the script will display an error and stop.

Timeframe Restriction
DAILY chart only — will show an error on any other timeframe.

Core Logic: Two-Candle Pattern Detection
Both signals start with the same Day 1 condition:
Day 1: The candle closes below the 26 EMA
From there, Day 2 determines the signal:
Yellow Circle (Bearish Continuation)
Plotted BELOW the Day 2 candle

Conditions:
  • Day 1 closed below the 26 EMA
  • Day 2 makes a lower low than Day 1’s low → low < low[1]Interpretation:
    Price is weakening — pushing to new lows below the EMA.
    Confirms downward momentum.


Green Circle (Bullish Reversal / Failed Breakdown)
Plotted ABOVE the Day 2 candle

Conditions:
Day 1 closed below the 26 EMA
Day 2 opens higher than Day 1’s close → open > close[1]
Day 2’s low never revisits Day 1’s low → low >= low[1]Interpretation:
Buyers defend the prior low with a higher open — classic false breakdown.
Suggests a potential reversal higher.

One Signal Per Downtrend (Lock & Reset)
After either a yellow or green circle is plotted, no more circles appear
Prevents clutter — focuses on first meaningful reaction

Reset Rule:
Lock is released only when price closes above the 26 EMA
Best Used On

Daily timeframe
SPY, SPX, QQQ, IXIC only
With trend, volume, or broader market context

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน