|
Often it is useful to display two stocks directly on top of each other on the same chart for comparison purposes. Here are the steps you can take to do that with our SharpCharts Workbench. First we'll create a simple Overlapping Comparison Chart based on prices, then we'll convert that into a Price Performance comparison chart.
In these examples, we'll be comparing the Dow Industrials ($INDU) with the S&P Large Caps ($SPX).
Create a chart of your "first" stock
There are several ways to create a new SharpChart. The easiest is to just go to our homepage and enter "$INDU" into box for step #2, then press "Go".
Remove any existing Indicators and Overlays
To make things easier, let's remove any Indicators and Overlays on your default chart. The quickest way to do that is to click the "Clear All" buttons in the "Overlays" area (#1) and "Indicators" area (#2). Be sure to click the "OK" button to confirm each removal. Finally, click the "Update" button (#3) to display your clean chart.
Add the "second" stock as a "Price" indicator
So here's the magic: You can use the "Price" indicator to add additional ticker symbols to your chart. Simply select "Price" from one of the empty indicator dropdowns (#1) and then enter the ticker symbol you want to chart in the "Parameters" box (#2). In our case, we want to use "$SPX" (which is, coincidentally, what is automatically added). Finally, we want the $SPX plot to appear in the same locations as our current Dow chart, so we need to make sure that the "Position" dropdown is set to "Behind Price" (#3). Finally, as always, let's click the "Update" button (#4) to see what we get.
Checking our progress so far
At this point, you should have a chart that looks similar to the one above. (Note: Members that have changed their Default chart settings will probably see some differences in any areas that they changed.) Note that $SPX is a thin black line positioned underneath the candlesticks that represent the Dow Industrials.
While technically, this is an example of an Overlapping Comparison chart, it isn't a very useful example. Let's clean it up a bit and make it more useful.
Change to a pure Line chart without Volume
Usually, people use line mode when comparing two things so let's change the chart's "Type" to "Line (thin)" (#1) in the "Chart Attributes" area. Next, we really don't need to see the Dow's volume bars for the purpose of comparing price action. By setting the "Volume" dropdown to "Off" (#2), we remove the volume bars AND we allow the vertical scale on the left side of the chart to display the $SPX values instead of the volume values. Click the "Update" button (#3) to see the final version of our chart.
The finished Overlaid Comparison chart!
This overlaid comparison chart allows us to visually compare the behavior of the Dow Industrials (red/black line) and the S&P 500 index (pure black line). It should come as no surprise that they move in very similar ways. Subscribers can change the color and styles of the lines to further clarify things.
Note that SharpCharts also allows you to create Overlaid Price Performance Comparison charts that allow you to directly compare the percent gain/loss of each index. Here's how to convert this chart into a Price Performance Comparison chart:
Change to a "Performance" chart with a "Price Performance" indicator
Change the "Type" dropdown to "Performance" (#1) and change the "Price" indicator to "Price Performance" (#2), then click "Update".
The finished Price Performance Comparison chart!
Now both lines start at 0.0% and move up and down based on performance instead of actual price. In this case, we see that the Dow has outperformed the S&P 500 over the time period covered by the chart.
Click here to see a live version of this chart.