Studies: Overlay


Overlay charts can be applied to a Host chart.  This allows you to look at 2 or more different charts  in the same chart window.  Overlay Charts can also be subtracted or divided to create Spread Charts and Ratio Charts.  The original chart is called the  'Host'  chart.  An Overlay chart is placed on the Host chart just like studies are placed on a chart.  The Overlay charts become  'Chart Objects'  of the Host chart.  The Properties of Overlay Charts, Spread Charts, and Ratio Charts can be accessed by clicking the  Chart Objects  button (or pressing Ctrl-O  on the keyboard).

Chart Overlays
The Overlay feature is used to open two or more charts in the same chart window.  Chart Overlays are used to compare relative movements between a Host chart and the Overlay charts.  An Overlay chart can be customized with its own colors, chart scaling, and chart type.  Each Overlay chart can also be offset up or down, or multiplied by a number to adjust the scale of the chart.  The Overlay can also be inverted upside down.

To place an Overlay chart on a Host chart click the  Studies  button and then select  'Overlay Chart'.  The  'Chart Overlay'  properties window will be displayed.  Type a chart filename in the  'Symbol'  entry box (ex.  IBM ) and then click  OK.  The entered chart will be overlaid on the Host chart.

Tip:   Open a chart of the  overlay symbol in the appropriate time frame, refresh the data, and close the chart before adding this symbol as an overlay on another chart.   This will guarantee that the overlay chart's data set exists and is complete.

The Overlay chart time frame will always be the same as the Host.  For example, a Daily chart can only be overlaid with other Daily charts.  Entering a filename extension (like  .D  for daily charts) is not necessary for the Overlay chart name since the time frame will always match the Host chart.

The Overlay chart will be synched-up with the Host chart so that each host bar has a matching Overlay bar for each time period.  If bars are missing from the Overlay chart, a synthetic bar will be created to fill the time.  Bars that exist in the Overlay data but not in the Host will be skipped and not displayed.  In short, the Host chart is the master in which the Overlay must coincide.  Since an Overlay chart is a  'Chart Object'  of the Host chart, a request to remove all Chart Objects from the Host chart will also remove the Overlay.

Spread Charts
A Spread Chart is created by subtracting an Overlay chart from a Host chart.  Spread charts can be opened in two ways.

1) Enter  Symbol--Symbol  in the Charts panel (example:  IBM--MSFT.D).  Note:  There are 2 minus signs that separate the symbols.  The first symbol will be the host, the second symbol will be the overlay spread symbol.  Enter the Time Frame after the 2nd symbol.

2) Add the Overlay study object to a Host chart, then specify the overlay  ‘Chart Type’.  Open the Properties window for the Overlay, and then select  'Spread Line'  or  'Spread Chart'  from the  'Chart Type'  drop-down list to cause the Overlay chart to be subtracted from the Host.  For example, to display a spread chart of  IBM  minus  MSFT, first display the  IBM  chart as the Host, then click the  Studies  button and select  'Overlay Chart'.  Enter  MSFT  in the  'Symbol'  entry box.  Select  'Spread Chart'  as the Chart Type and then click  OK.  The resulting spread calculation will be displayed on the Host chart as either a Line or as Spread Bars.  Optional multipliers or price offsets can be entered in the  'Parameters'  panel to adjust the value of the Host and Overlay chart data.

Note:  The selections of  'Spread Chart'  and  'Ratio Chart'  will plot as bars, where open prices give a specific point for the open evaluation, close prices give the close evaluation, and then the high and low of the bars is the maximum or minimum evaluations from the pairings.  This is the best reconstitution of the bar range that we can assemble after the fact from the bar history.

Ratio Charts
A Ratio Chart is created by dividing an Overlay chart into a Host chart.  Select  'Ratio Line'  or  'Ratio Chart'  from the  'Chart Type'  drop-down list to cause the Overlay chart to be divided into the Host.  For example, to display a Gold and Silver ratio chart do the following.  The following example divides the July 2007 Silver chart into the June 2007 Gold chart.  First display the  GC M7  chart as the host, then click on the  Studies  button and select  Overlay Chart.  Enter  SI N7  in the  'Chart'  entry box.  Select  'Ratio Chart'  as the Chart Type and then click  OK.  The resulting ratio calculation will be displayed on the Host chart as Ratio Bars.  Optional multipliers or price offsets can be entered in the  'Parameters'  panel to adjust the value of the Host and Overlay chart data.

Chart Overlay Properties Window
Click the  Chart Objects  button to open the  'Chart Overlay'  properties window.  The properties window is used to change the settings for the Overlay chart.  Click the  Delete  button to remove the Overlay chart.  Click the  Delete All  button to remove all Overlay charts from the host chart.

  • Use as Default  - Save the current settings as the default for all subsequent Overlay charts.
  • Privatize - Hides the study settings and prevents others from opening the properties window.
  • Invert Pattern - Invert the overlay chart upside down.  Inverted overlays will be drawn using the 2nd color, instead of the 1st color. 
  • Lock Shift L/R - Prevent the overlay from being dragged left or right (synched with the Host chart). 
  • Extend Hashes - Doubles the width of the open and close hash marks on each Overlay bar.
  • Show Values - Display the Overlay chart values in the studies window (at the left edge of the chart).
  • Show Title - Display the Overlay chart symbol on the chart (top left corner).

Parameters

  • Overlay:    Enter a multiplier number for the Overlay chart.  For example, entering a value of  10  will cause the Overlay chart to be multiplied by  10.  Enter a value of  1  if no adjusting is desired.
  • Host:    Enter a multiplier for the Host chart.  For example, entering a value of  5  will cause the host chart to be multiplied by 5.
  • Offset U/D:    Enter a fixed offset number.  The offset number will be added or subtracted the Overlay chart to shift the chart either up or down.  For example, entering a value of   -500  will cause all chart prices in the Overlay chart to be reduced by 500 points.
  • Shift L/R:    Enter a shift number.  This allows you to shift the Overlay bars to the left or right.
  • Location:    The Overlay can be plotted in the main Chart window, or in sub-windows 1 through 8, or in the Volume window.
  • Chart Type:    Same as Host:  The overlay will be plotted the same as the host.
    • Bar Chart:  The overlay will be plotted as a Bar Chart.
    • Line Chart:  The overlay will be plotted as a Line Chart.
    • Candlesticks:  The overlay will be plotted as a Candlestick chart.
    • Close Ticks:  The overlay will be plotted as a Close Ticks only chart.
    • Spread Chart:  The overlay will be subtracted from the Host chart.
    • Ratio Chart:  The overlay will be divided into the Host chart.
  • Added Chart:  Each component of both charts are added together to make a new bar.  Example, both Open prices are added to produce a new Open price.  Both High prices are added together to produce a new High price.
  • Chart Scale:    Host:  The overlay will be scaled on the same scale as the Host chart.
    • Hidden:  The overlay will have its own scale.
    • Shown:  The overlay will have its own scale, and will display its scale values.
    • Don't Plot:  The overlay data will be on the chart, but will not be visible.  This is most useful if the data from the Overlay is being accessed by an ESPL custom program.  The Overlay data is available for ESPL calculations, but is not plotted or visible on the host chart.
    • Note:  Do not set the chart scale to  'Host'  if the Overlay chart data is not trading in a similar price range.  Otherwise, the Overlay chart will be plotted outside the chart window and will not be visible.  Double-click on the chart scale numbers (right edge of the chart) while viewing a chart to switch the scale numbers between the overlay chart and the host chart.  The color of the scale numbers will match the color of the overlay bars.
  • Overlay Alignment – The alignment of the overlay data can be shifted to the left or right by 1 screen pixel.  This might be desirable if the Overlay bars are covered by the Host bars.

Study Lines

  • Show - Place a check mark in the  'Show'  check box to display or hide the Overlay.
  • Zones - Optionally enter some price Zone values.  If the price of the Overlay rises above or below the 'Zones' values, then the Markers and Colors for the High and Low Zone areas will be used.  This allows you to plot unique colors and markers when the Overlay reaches a certain value.
  • Color - Click the square color boxes to select colors for the Overlay and Inverted Overlay.
  • Style - Select an Overlay line Style from the drop-down list box.
  • Marker - Optionally select a Marker for the Overlay.
  • Color - Click the square color boxes to select marker colors.
  • Global - Optional Save the values of the Overlay into Global Variables (which can be accessed by other studies).

Grid Lines
If the Overlay is plotted in a study sub-window, the grid line color, style, and different grid levels can be selected.

Keyboard Commands
The following keyboard keys can be used to adjust the scaling and height of the Overlay chart.

  • Press the UP and DOWN Arrow keys on the keyboard to move the Host chart bars up or down.
  • Press the  LEFT and RIGHT Arrow keys on the keyboard to adjust the vertical height of the Host bars.
  • Press  SHIFT-UP Arrow and SHIFT-DOWN Arrow to move the Overlay chart bars up or down.
  • Press  SHIFT-LEFT Arrow and SHIFT-RIGHT Arrow to vertically adjust the Overlay bars height.

We all seek a leading indicator that gives advance notice of what the market is going to do next.  I have been watching the interaction of JNPR (Juniper Networks) and the June Nasdaq futures contact.  At several key turning points in NQ M2, I see that JNPR is already leading the way, giving advance notice of what the NQ M2 market will do next.   Permit me to share with you a three day sequence in comparing both charts using 5-minute intra-day bars.

On Monday, NQ M2 formed a wedge from the open until 12:00 (noon Central time).  The question in the minds of NQ traders was whether the breakout from the wedge would be up or down.  The JNPR chart was steadily lower all morning serving as an advance indicator that NQ would be going DOWN and not up.

On Tuesday, JNPR and NQ M2 both rallied until 10:30.  NQ M2 put in a new high at 11:05, but JNPR did not.  This is a first BIG clue that the 11:05 top in NQ M2 was going to be the daily high.  At 14:10, NQ M2 was pushing higher for a possible retest of the 11:05 high, but JNPR was definitely in a downtrend.  JNPR's 14:10 rally was nowhere near its mid-morning high.  Again, JNPR served as an advance indicator that the NQ M2 retest of the high would fail, and NQ M2 would go lower.

Wednesday opened with a sharp sell-off in both JNPR and NQ M2.  They both put in lows at 9:35.  NQ M2 put in a new lower low at 10:30, but JNPR found support and did not put in a new low.  Again, JNPR gave advance notice that the market would not continue lower.  See the divergence that is marked on this chart.  From the 10:30 lows, both JNPR and NQ M2 experienced significant rallies.

Have I found the crystal ball for NQ in the form of JNPR?   I doubt it.  Useful correlation found (with the benefit of hindsight) on three charts is not statistically sound.  However, the trading tip being taught is that an individual stock may respond a bit quicker than a composite index.  JNPR is a heavily traded Nasdaq stock, and I am seeing useful correlation where the e-mini Nasdaq future follows the direction set by JNPR.  At least in the three day sequence documented in this article, JNPR was a worthy leading indicator.  There was significant divergence at three key turning points in comparing JNPR behavior at these tops and bottoms with the NQ M2 behavior.  NQ M2 followed the JNPR lead either higher or lower.  When NQ M2 tried to go higher but JNPR was going lower, NQ M2 turned around and went lower.  When NQ M2 tried to go lower, but JNPR would not follow lower, NQ M2 turned around and went higher.  This is just the type of leading divergence indicator sought after by analysts who use studies to show confirmation and divergence.

Overlay History
In the past users creating custom symbols with Setup | Custom Symbols form would often have a simple spread or ratio, and yet lack having any back history.  If the same formula can be expressed in our Overlay study to do the spread or ratio, then you will now be able to get some back history.  Create the overlay, and when it displays it makes the calculations by loading the chart files and syncing the data bars.  Ensign Windows has the answer because it plots the spread or ratio on the chart.

The feature added was to automatically write the spread or ration calculations out as an Ensign chart file. The file written will always be the name Overlay, with the chart time frame for an extension, in the same folder as the source data, such as C:\Ensign\Minute.  You can use Windows Explorer to rename the Overlay file to be the symbol you use for your custom symbol. And then viola, you have some back history for your custom symbol chart.

watch video » Chart Overlays


Last modified 3/19/09 5:18 PM