Plotting the Relative Strength Line in StockCharts, TC2000 and TradingView

Plotting the Relative Strength Line in StockCharts, TC2000 and TradingView

This blog post will walk you through the steps to add the Relative Strength line to your Stockcharts setup.

Stockcharts FREE accounts allow you to chart three indicators and this is enough to plot the Relative Strength Line over-layed with SPX in a style that is very similar to MarketSmith.

We won’t walk you through the registration process but we are sure you can figure that out for yourself at

Step 1: Set up your Chart Attributes

Relative Strength Line

HLC Bars achieve the same candle type as on MarketSmiths platform.
Time Span can be configured to your liking
Up Color: Blue
Down Color: Pink
Select: Log Scale, Color Volume, Smooth Lines

The Chart Attributes are personal preference.

Step 2: Depending on the level (if FREE) you can plot up to 3 Indicators / Moving Averages on the charts. (21, 50, 200DMA are typical Moving Averages that we like to use on our charts)

The Overlays are of personal preference. Stockcharts allows you to set colors and opacity as well.


Step 3: Plotting the Relative Strength Line and SPX price action

In the Indicators Section, set the first Indicator to Price-Performance and for Parameters use the $SYMBOL:$SPX
This will allow you to compare “Symbols” to the $SPX which is the Relative Strength Line
We set the color to BLUE for the Price-Performance Indicator
Next, to plot the $SPX price line select Price from the Indicators drop down and then type in $SPX for Parameters.
To achieve a plot of the $SPX behind the Relative Strength Line we just plotted set the Position to Behind Ind.
That is it. You are all set.


How to Plot Relative Strength Line as a Candlestick

Below we do a few comparisons on how this stacks up with MarketSmith’s Relative Strength Line. Enjoy! 🙂

StockCharts Chart with Relative Strength Line and SPX Price Action


Note the Blue Relative Strength Line on MarketSmith and how it compares to what plotted on StockCharts. A very similar effect.

Credit to @RichardMoglen

Step 1: Press the green + sign in the upper left corner of TC2000
Step 2: Type in Relative Strength
Step 3: Click the first Indicator that comes up called “Relative Strength” (See image below)
Step 4: Continued below

TC 2000

Step 4: Right the Relative Strength indicator we added and click Symbol
Step 5: Similar to the image below we are going to input a symbol, except we are going to use SPX not SPY.
Step 6: Change the color to whatever you’d like and click ok.
Step 7: That’s it!

RS tc

At the end of this section, you will be able to plot the Blue Relative Strength Line on MarketSmith in Trading View. Very similar effect.

Step 0: Head over to
Step 1: Add Both “Relative Strength Line” and “SPX Line” to “Add to Favorite Scripts” near the bottom of the page.
Step 2: Click “Indicators” at the very top on TradingView. Under Favorites click “Relative Strength Line”
Step 3: Hover on the Indicator name (Relative Strength Line) on your plot under legend and click the three dots at the very right. Under the “Pin To Scale” choose a setting that works best for you (optional).
Step 4: Once again click “Indicators” at the very top on Trading View. Under Favorites click “SPX Line”
Step 5: Hover on the Indicator name (SPX Line) on your plot under legend and click the three dots (see screenshot). Under the “Move To” choose “New Pane Above”.

All set. You should now have a similar setup to that of MarketSmith with a Relative Strength Line and SPX plotted on the same chart.

Please note we are not affiliated nor have do we have any partnerships with any of the businesses mentioned in this blog post.

This is for Educational Purposes only

At the end of this section, you will be able to plot the Blue Relative Strength Line on MarketSmith in ThinkorSwim. Very similar effect.

Step 1: Right click on your ThinkorSwim daily chart and click Edit Studies


Step 2: Click Create to Create a new Script


Step 3: Add the paste the following code:

# Plot the Relative Strength Line in ThinkorSwim
# Written by: @RayTL_
# Site:
# V1

declare lower;

input CorrelationWithSecurity = "SPX";
input aggregationperiod = AggregationPeriod.DAY;

def close2 = close(CorrelationWithSecurity, aggregationperiod);
def RS = close / close2;

input newRngMax = 99; #Maximum normalized value
input newRngMin = 1; #Minimum normalized value

def HHData = HighestAll(RS);
def LLData = LowestAll(RS);

plot nr = ((( newRngMax - newRngMin ) * ( RS - LLData )) / ( HHData - LLData )) + newRngMin;

AddLabel(yes, Concat("Relative Strength: ", nr[0]), Color.WHITE);


Step 4: Click Apply and Ok. Adjust the area of the chart where you’d like to place the RS line accordingly based on personal preference.

Share on: