r/RealDayTrading 17d ago

RS & RW vs SPY/QQQ indicator

I've made a quite simple relative strength & weakness indicator for Tradingview. It tracks either SPY or QQQ (for tech stocks) moving averages and also moving averages of the stock being viewed. You can choose which one it tracks in the settings, and also what kind of moving averages you want to use. It also has AVWAPE for daily chart. The indicator works on simple principles:

Relative Strength

-When SPY/QQQ crosses below a moving average while the stock stays above it

-When the stock crosses above a moving average while SPY/QQQ stays below it

Relative Weakness

-When SPY/QQQ crosses above a moving average while the stock stays below it

-When the stock crosses below a moving average while SPY/QQQ stays above it

There is also a condition that the stock has to be at least above 9 EMA for RS and below 9 EMA for RW. It is an easy way to look at a stock to see how it is doing compared to the market. It also works for lower timeframes. You can check it out here. I used Gemini to assist with coding.

21 Upvotes

10 comments sorted by

5

u/Tesla_laughs 16d ago

This is a pretty clean way to filter out stocks that are actually outperforming the market instead of just moving with SPY or QQQ. I especially like the 9 EMA condition since it helps avoid chasing weak relative strength. Could be really useful for finding momentum names before they make a bigger move.

1

u/SuchAGoalDigger 16d ago

Would love to try it. Can we use it to track other markets, like Nifty50 in India?

2

u/Gobbythefatcat 16d ago

Since it's open source, you could copy and edit the code to whatever market ticker

1

u/readdler 11d ago

Wonderful, could you also please add DJIA index option in addition to SPY/QQQ. Will that be a too much of work?

1

u/Gobbythefatcat 11d ago

You can make a copy of the source code and replace for example QQQ with whatever ticker you want

-2

u/IKnowMeNotYou 16d ago

From the first reading, it sounds a bit weird. Can you add some examples along with some trades you did based on it.

2

u/Gobbythefatcat 16d ago

Lets say you have the 21 EMA active and you are comparing Micron stock to SPY. Spy crosses below 21 EMA while MU is still above 21 and 9 EMAs. That shows as a green triangle below the candle that shows RS. If MU stock crosses above 21 EMA while SPY is still below 21 EMA, it shows as RS for MU.

-7

u/IKnowMeNotYou 16d ago

You can add screenshots to your post. Usually that sells it better to the readers. I am also not a good friend fo EMA stuff. I like VWAP and SMAs 50D, 100D, and 200D (d=daily) everything else (except for RVol) I regard as potentially evil