# 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.&#x20;

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

{% hint style="info" %}
**Learn More:** [The Price Indicator](https://help.stockcharts.com/charts-and-tools/sharpcharts/sharpcharts-workbench/editing-sharpcharts#the_price_indicator) | [Overlaid Charts](https://help.stockcharts.com/charts-and-tools/sharpcharts/sharpcharts-workbench/editing-sharpcharts#creating_overlaid_charts) | [Performance Comparison SharpCharts](https://help.stockcharts.com/charts-and-tools/sharpcharts/sharpcharts-workbench/editing-sharpcharts#performance_comparison_sharpcharts)
{% endhint %}

This 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.

## 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 <a href="#create_the_sharpchart" id="create_the_sharpchart"></a>

#### **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**.

<figure><img src="https://2414490151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FELJo6JImRKx7nLaFjAPl%2Fuploads%2FpS1TbWFJ9IVhhYdWakgg%2Foverlaidcharts01.png?alt=media&#x26;token=cfc0a4a7-04f7-4646-88a7-e0375188335a" alt="Enter ticker symbol of chart you wish to view in the Create-a-Chart search box"><figcaption><p>The first step to create an overlay in SharpCharts is to enter a ticker symbol</p></figcaption></figure>

#### **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.

<figure><img src="https://2414490151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FELJo6JImRKx7nLaFjAPl%2Fuploads%2FYuaQRWRSr5290ERQw32N%2Foverlaidcharts02.png?alt=media&#x26;token=e6ae80c9-093f-4c20-a45e-31aa83f128ff" alt="Clear indicators and overlays from a chart by selecting Clear All"><figcaption><p>Clear all indicators and overlays from the chart.</p></figcaption></figure>

{% hint style="warning" %}
**Note:** You may want to make other changes to the chart, such as changing the size or the color scheme. In this example, we're using the “Spruce” color scheme.
{% endhint %}

### Add the Second Ticker Symbol to the Chart <a href="#add_the_second_ticker_symbol_to_the_chart" id="add_the_second_ticker_symbol_to_the_chart"></a>

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.

<figure><img src="https://2414490151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FELJo6JImRKx7nLaFjAPl%2Fuploads%2FW0RdV6PPrFDoFxKvUvw8%2Foverlaidcharts03.png?alt=media&#x26;token=067dd87f-4e66-4b50-abf5-981a6d2e45e2" alt="You can add a second ticker symbol for the chart overlay using the Price indicator"><figcaption><p>Add the second ticker symbol using the Price indicator.</p></figcaption></figure>

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

<figure><img src="https://2414490151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FELJo6JImRKx7nLaFjAPl%2Fuploads%2FJIDgsiJNtiBR3FvSC7G6%2Foverlaidcharts04.png?alt=media&#x26;token=87f4137e-896a-4853-9821-03352e9c0ee5" alt="Chart displaying two overlays using StockCharts.com"><figcaption><p>Overlaid charts in SharpCharts.</p></figcaption></figure>

### Changing the Style of the Chart <a href="#changing_the_style_of_the_chart" id="changing_the_style_of_the_chart"></a>

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.

<figure><img src="https://2414490151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FELJo6JImRKx7nLaFjAPl%2Fuploads%2F3Qf98GAcor0MOKT1vaPh%2Foverlaidcharts05.png?alt=media&#x26;token=d9309738-50dd-4ab9-8468-5f451895be1c" alt=""><figcaption><p>Change the look and feel of your charts by modifying the settings under Chart Attributes.</p></figcaption></figure>

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

<figure><img src="https://2414490151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FELJo6JImRKx7nLaFjAPl%2Fuploads%2FscL2qZdeSvKm9IaY6pRQ%2Foverlaidcharts06.png?alt=media&#x26;token=7487eeb3-a261-4df4-b3c9-86d19ee87fa0" alt="Example of overlaid charts in StockCharts.com"><figcaption><p>Example of overlaid charts in StockCharts.com.</p></figcaption></figure>

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 <a href="#converting_to_a_price_performance_chart" id="converting_to_a_price_performance_chart"></a>

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**.&#x20;

<figure><img src="https://2414490151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FELJo6JImRKx7nLaFjAPl%2Fuploads%2FZ68SaTiVfGobeoYvDMud%2Foverlaidcharts07.png?alt=media&#x26;token=fbea39e5-a143-481c-b77d-26354a66f109" alt="Compare price performance of overlaid charts using the same scale by changing chart type to Performance and indicator to Price - Performance."><figcaption><p>Use Type and Price - Performance to compare performance in percentage terms.</p></figcaption></figure>

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

<figure><img src="https://2414490151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FELJo6JImRKx7nLaFjAPl%2Fuploads%2Fsekf93YHTrdBORy08Ufl%2Foverlaidcharts08.png?alt=media&#x26;token=12faf64c-adb3-4a38-92b7-e57ff2f2f829" alt=""><figcaption><p>Comparing overlaid charts from a percentage perspective.</p></figcaption></figure>

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.
