How to Create Overlaid Charts

When comparing two stocks or other ticker symbols, it helps to display the price bars for the two symbols overlaid on the same price plot. To overlay charts in the SharpCharts Workbench, you add a Price indicator for the second symbol and position it "Behind Price" so that it is overlaid on the main price plot.

For more head-to-head performance comparisons, you can convert both symbols to plot performance data instead of raw price data.

The brief interactive demo below shows you how to add a Price indicator to your SharpCharts and position it "Behind Price". The more in-depth tutorial walks you step-by-step through creating a chart comparing the Dow and the S&P 500 on a single price plot, then walks through converting it to a Performance chart.

Interactive Demo: Overlaying a Second Ticker Symbol on a SharpChart

This interactive demo will show you step-by-step how to add a price plot for a second ticker symbol to your SharpChart by adding a Price indicator and positioning it "Behind Price" to overlay it on the main price plot.

Click on the blue Continue button below to start the interactive demo.

Tutorial: Creating an Overlaid SharpChart comparing the Dow to the S&P 500

In this step-by-step tutorial, we'll use a Price indicator positioned behind the main price plot to create a SharpChart comparing the Dow Jones Industrial Average ($INDU) with the S&P 500 Large Caps ($SPX). Then we'll explore using the Price Performance indicator and Performance chart type to compare the two based on performance rather than raw price data.

Create the SharpChart

Step 1: Enter the Ticker Symbol

There are several ways to create a new SharpChart, but the easiest is to enter the symbol in the Create-a-Chart box at the top of the page and then click Go.

Enter ticker symbol of chart you wish to view in the Create-a-Chart search box
The first step to create an overlay in SharpCharts is to enter a ticker symbol

Step 2: Clear Indicators and Overlays

To simplify the chart, let's remove any Indicators and Overlays from the default chart. The quickest way to do that is to click the Clear All link in the Overlays section, then repeat the process with the Clear All link in the Indicators section.

Clear indicators and overlays from a chart by selecting Clear All
Clear all indicators and overlays from the chart.

Add the Second Ticker Symbol to the Chart

You can use the Price indicator to add additional ticker symbols to your chart. In this example, we'll add $SPX to the chart.

Step 3: Use the Price Indicator to Add the Ticker Symbol of the Overlay

Select Price from one of the empty indicator dropdowns, and in the Parameters box enter the ticker symbol you want to chart. In this case, we will use $SPX for the S&P 500. Ensure the Position dropdown is set to Behind Price so that the $SPX data will appear on the same chart panel as the primary $INDU data.

You can add a second ticker symbol for the chart overlay using the Price indicator
Add the second ticker symbol using the Price indicator.

Once these changes have been made, your chart should look similar to the one below.

Chart displaying two overlays using StockCharts.com
Overlaid charts in SharpCharts.

Changing the Style of the Chart

Notice that $INDU is charted using candlesticks, and $SPX using a line. This is like comparing apples to oranges. Usually, people use line charts for both ticker symbols to make comparing the data easier.

Step 4: Change the Look of Your Charts

To change the $INDU candlesticks to a line, simply change the Type dropdown to Line (thin).

Change the Volume dropdown to Off to remove the volume bars from the chart. This makes for a less cluttered chart, but more importantly, it allows the vertical scale on the left side of the chart to display the $SPX values instead of the volume values.

Change the look and feel of your charts by modifying the settings under Chart Attributes.

Once you've made these changes, the final overlaid comparison chart should look something like this:

Example of overlaid charts in StockCharts.com
Example of overlaid charts in StockCharts.com.

This chart style allows you to visually compare the behavior of the Dow Jones Industrial Average and the S&P 500 indexes. It should come as no surprise that they move in very similar ways. StockCharts subscribers can change the color and style of the lines for more clarity.

Converting to a Price Performance Chart

SharpCharts can also be used to create overlaid Price Performance comparison charts. These charts allow you to compare each index's percent gain/loss. Here are the easy steps to convert this chart into a Price Performance comparison chart.

Step 5: Change To Performance Chart Type

Change the Type dropdown for the main ticker symbol to Performance. Then, change the Indicator from Price to Price - Performance.

Compare price performance of overlaid charts using the same scale by changing chart type to Performance and indicator to Price - Performance.
Use Type and Price - Performance to compare performance in percentage terms.

The final overlaid Price Performance chart should look similar to the one below.

Comparing overlaid charts from a percentage perspective.

Now both lines start at 0% and move up and down based on the percentage change rather than the price. In this case, we can see that the Dow has outperformed the S&P 500 over the time period covered by the chart.

Last updated

Was this helpful?