To determine relative strength, one simply divides the stock in question by the general market in order to get a ratio. Most trend followers ideally want to hold a stock that has strong relative strength.
William O'Neil, who combines elements of trend following trading along with fundamental analysis, devotes an entire chapter to relative strength in his excellent book, How to Make Money in Stocks. O'Neil discusses the importance of limiting buys to the strongest stocks in the strongest sectors:
It seldom pays to invest in laggard stocks, even if they look tantalizingly cheap. Look for, and confine your purchases to, market leaders.
Let's look at some specific examples of stocks showing strong relative strength:
The green area at the bottom of the chart shows the ratio of the stock divided by SPY. The fact that it is rising shows that this particular stock has been stronger than the general market.
The next chart is a gold stock, and the relative strength this time looks at the stock divided by GDX, which is a gold stocks ETF. A rising green area above means that this gold stock is doing better than the sector.
Buying the strongest stocks, especially if they are making new all-time highs, while the general market itself is also behaving strongly, definitively places the odds of success in your favour.