OPEN-SOURCE SCRIPT
26 EMA Reversal Logic

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:
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
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
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.