• LIMITED TIME ONLY: Take $40 off VIP with code: BTD40.

SPY EMA On Any Ticker Chart

Hopefully this makes sense. Looking to have an ema for the SPY on a chart for any other ticker, AMD for example. If candles above the SPY EMA then I am buying in alignment with overall market trend. Would be better for me then checking separate chart for spy as I have limited screen space. I have tried the comparison feature in the software, which puts two charts together but its cluttered looking.


Staff member
There will have scaling issue if the stock you're looking at is not around the same price level as SPY.

# EMA of SPY on Any Chart
# Assembled by BenTen at useThinkScript.com

def spy_price = close("SPY");
input length = 9;
input displace = 0;

plot AvgExp = ExpAverage(spy_price[-displace], length);
Last edited:

Bung Bang

New member
Hi Ben, I have been thinking along the same line as TechnicallyDreaming but not on a chart; I want to have Scan codes to find Nasdaq stocks that are in divergence against SPY trend, something like the last 5 bars (agg=5 minutes) trending up in these stocks but SPY is trending down. Would you be able to help with these Scan codes ?

Similar threads