SPY EMA On Any Ticker Chart

  • Thread starter technicallydreaming
  • Start date
technicallydreaming

technicallydreaming

Member
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.
 
BenTen

BenTen

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

Code:
#
# 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);
AvgExp.SetDefaultColor(GetColor(1));
 
Last edited:
B

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

Top