Relative Strength Rank Indicator

This indicator is a ranking tool used to compare a group of stocks, ETFs or futures contracts to determine which specific instrument is performing best. The indicator creates a score based upon the symbols historical price movement. You can then compare this score to the other RS Rank scores of other stocks or ETFs in your basket of trading instruments. Thus, you can simply pick the instrument with the highest RS Rank score when creating a momentum based trading system.

( ( Long Term Price Change + Short Term Price Change ) / 2 ) / 10 Day ATR

The RS Rank is computed by taking the average of a long-term price change with a short term price change. This average is then divided by the 10-day Average True Range. This will produce a ranking score which can be compared to other instruments.

Here is an example. We want to use 140 days as our Long Term Price change and 20 days for our Short Term Price Change. Thus we get:

( ( Close-Close[140] + Close-Close[20] ) / 2 ) / 10 Day ATR

Download

Relative Strength Indicator (TradeStation ELD)
Download Relative Strength Indicator (text file)

 

 

About the Author Jeff Swanson

Jeff is the founder of System Trader Success - a website and mission to empowering the retail trader with the proper knowledge and tools to become a profitable trader the world of quantitative/automated trading.

follow me on:
  • Geoff S says:

    Thanks for publishing this concept and code. But the code looks like a function code only for the RS value. It will still take an indicator built around it to have a practical equity selector ranking system. Perhaps using Radarscreen or scanner systems or one of various ways of loading charts. Do you have any ideas for a complete system?

    Many Thanks

    geoff S

    • Hello Geoff S,

      Yes, you are correct. This is just the function code. You can use this to build both a Radarscreen study or a Strategy. You could also use the RS Rank indicator as a trend filter for a system. Here is a post in regards to that. I don’t have an example handy to show you a complete system. That might be a good idea for another article. Thanks for the idea.

  • Jeff:

    I just came across your website – very well done with insightful research.

    I recently licensed Tradestatio (TS) with Portfolio Manager(PM). Have you been able to do convert the relative strength eld listed above into a strategy and do a backtest and walk-forward analysis? It seems TS allows you to optimize only one security at a time. PM used to have the walk-forward ability but no longer does. I see in the other articles you reference ETF Replay – but that has no walk forward or out of sample ability. Is there a way to do this in TS? Is there another software where that combined functionality exists which would allow to design a robust approach to buying a portfolio of securities using a relative strength ranking algorthim logic?

    Please advise.

    Many thanks.

    B

    • Hello Bill. Thanks for the kind words. Unfortunately, I’ve not worked much in this area so, I won’t be of much help. I really hope to delve into TradeStation’s Portfolio Maestro this year.When I do I plan on creating several articles. According to TradeStation’s website (http://www.tradestation.com/trading-technology/tradestation-platform/analyze/portfolio-maestro) PM will…”If you trade multiple symbols and strategies, TradeStation Portfolio Maestro is a highly sophisticated tool that provides portfolio-level performance reporting, risk assessment and optimization for virtually any combination of symbols and strategies.” So, it appears you should have the ability to optimize over a portfolio of symbols.

  • George says:

    Hello Jeff, happy New Year!

    I came across the RS Rank Indicator from a link on Traders Laboratory that you posted in 2011.
    ” Trend Testing Indicators For Adaptive Trading Systems – Traders”

    I was impressed with the RS Rank technique results you posted, so I thought I’d try to replicate those results for SPY and SPX as described. Unfortunately I could not. I know it’s been a few years, but was there anything missing in the original article? I used LongPeriod=140, ShortPeriod=20 and the ATR=10. I believe those are correct.
    Buy if rsRank > 0 ?

    Thanks again for the great website. I visit it weekly!
    George

    • Hello George and Happy New Year to you as well. Sorry for the long delay in getting back with you. I reviewed the article and I wish I was more clear when I wrote it! It was a while ago but looking at the source code it appears the a values of 140, 20, 10 may have been used. However, it’s possible 200, 20, 10 may have been used. Sorry I could not be of much help. What you could do is run a optimization study on that long-look-back period to see what give you the more similar value.

  • >