6 STUDIES            Main Table of Contents

Study Menu

Overlays

Displaying an Overlay on a Bar Chart
Changing the Parameters of An Overlay

Studies

Displaying a Study on a Chart
Changing the Parameters of a Study
Displaying a Study on a Split Chart

[ ]Add a Study
Charting a Study on a Study

Deleting a Study

Removing an Overlay Study
Deleting a Study Window

Optional Studies

Formulas

Description of the Studies

Trend Followers:
Overbought/Oversold Indicators
Trend Indicators
Activity Indicators

Acceleration

Accumulation/Distribution (A/D) Oscillator

Average Balance Volume

Average Directional Index (ADX)

Bollinger Bands

Commodity Channel Index (CCI)

Cumulative Volume

Directional Indicator (DMI)

Directional Oscillator

HiLo Oscillator

Historical Volatility

Keltner Channels

Moving Average Convergence Divergence (MACD)

MACD Oscillator

Momentum

Moving Averages

Moving Average Envelope

Moving Average Momentum

Moving Average Oscillator

On Balance Volume

Open Interest

Parabolic

Relative Strength Index (RSI)

Stochastic, Fast

Stochastic, Modified

Stochastic, Slow

Variable Accumulation Distribution

Volume

Volume Accumulation Oscillator

Williams' %R

STUDIES

Aspen Graphics comes with an extensive selection of indicators. This section will show you how to bring up these indicators, change their parameters, and apply them to your charts.

Study Menu                  Top of Page

Studies are displayed on the screen by either choosing them from the Select Study menu or by typing the command associated with the study. To bring up the Select Study menu (Figure 1), type .study btnEnter.gif (1425 bytes).

Figure 1

The Select Study menu is divided into three sections. The first four selections in the Select Study menu are types of charts that you can display in Aspen. If you have a bar chart window on your screen, you can change it to a candlestick chart by selecting Candlesticks. The same can be done to change your chart to a Bar Chart, Point & Figure Chart, and a Tic Chart.

Overlays

The next section of the Select Study menu is Overlays. Overlays are indicators that are superimposed on the chart. Multiple overlays can be displayed on one chart and can be fine-tuned to your specifications by changing the parameters.

Displaying an Overlay on a Bar Chart                  Top of Page

To display an overlay on a bar chart, follow these steps:

  1. Bring up a chart by typing cht_1 btnEnter.gif (1425 bytes).
  2. Type sp# btnEnter.gif (1425 bytes). A graph of the current S&P contract will appear.
  3. Tap the btntilda.gif (1192 bytes) key one time. The Graph Menu will be displayed.
  4. Single left click on Study. The Select Study menu will appear (Figure 1).
  5. In the Overlays section, single left click on Moving Average. A moving average will be placed on the bar chart. Single left click on Done to view the chart.

Changing the Parameters of An Overlay                  Top of Page

  1. Continuing with the previous chart, tap the btntilda.gif (1192 bytes) key one time. The Graph Menu will be displayed.
  2. Single left click on Parameters. The Edit Studies menu will be displayed.
  3. Single left click on Moving Average. The Moving Average menu (see Figure 2) will be displayed.

Figure 2

  1. Single left click under Avg. Type. The Avg. Type menu will be displayed.
  2. Single left click on the type of moving average you would like to use.
  3. Single left click under the Period heading. An edit box will appear.
  4. Type in the number of periods you would like to use, and tap the btnEnter.gif (1425 bytes) key. The period is the number of bars on the chart used to calculate the average. If you have a daily chart, the period is in days. If you are using a 60-minute chart, the period is in hours.
  5. Single left click under the Shift heading. An edit box will appear  
  6. Type in the number of bars you would like to shift the moving average, and tap the btnEnter.gif (1425 bytes) key. A positive integer will move the moving average to the right, while a negative integer will move the moving average to the left. A value of zero in this field leaves the overlay aligned with the corresponding chart values.
  7. Single left click under the Price heading. A Price menu will appear.
  8. Single left click on the price type that you would like the study to use.
  9. Single left click under the Color heading. A Color menu will appear.
  10. Single left click on the color you would like the Moving Average to be.
  11. Single left click on Draw. The Moving Average will change to reflect the parameters you have selected.
  12. When finished, single left click on Done.

Studies

The third section of the Select Studies menu is Studies. The indicators in this group have their own scale and should be viewed in their own window. If a chart is highlighted, and a selection is made from the Studies section, the study will replace the bar chart.

Displaying a Study on a Chart                  Top of Page

To display a study on a chart, follow these steps:

  1. Type cht_1 btnEnter.gif (1425 bytes). Type in the instrument you want to use, and tap btnEnter.gif (1425 bytes).
  2. Tap the btntilda.gif (1192 bytes) key one time. The Graph Menu will be displayed.
  3. Single left click on Study. The Select Study menu will appear.
  4. Single left click on Directional Indicator. The bar chart will change to a Directional Indicator study (see Figure 3).
  5. Single left click on Done. The Select Study menu will disappear.

Figure 3

Changing the Parameters of a Study                  Top of Page

To change the parameters of a study, follow these steps:

  1. Display a Directional Indicator study as detailed in the previous section.
  2. Tap the btntilda.gif (1192 bytes) key one time. The Graph Menu will appear.
  3. Single left click on Parameters. A Directional Indicator menu (Figure 4) will appear.

Figure 4

  1. Single left click on 14 under the Period heading. An edit box will appear.
  2. Type in the number of periods you would like the Directional Indicator to use, and tap the btnEnter.gif (1425 bytes) key one time.
  3. Single left click on the word Green under the Color heading. A color menu will appear.
  4. Single left click on the color you would like the DI+ line to be.
  5. Repeat steps 6 and 7 for the DI- line.
  6. Single left click under the Graph heading. A Graph menu will appear.
  7. Single left click on the type of graph you would like to use.
  8. Single left click on Draw. The DI study will reflect the changes you have made.
  9. Single left click on Done. The Directional Indicator menu will disappear.

Displaying a Study on a Split Chart                  Top of Page

There are times when you may like to see both the bar chart and a study on the same page. One way to see this is to split the chart with the bars on the top and the study on the bottom. To put a study on a split chart, follow these steps:

  1. Type cht_1 btnEnter.gif (1425 bytes).
  2. Type the instrument you want to use and tap the btnEnter.gif (1425 bytes) key one time.
  3. Type .split btnEnter.gif (1425 bytes). The chart will split and the lower portion of the chart will become the active window.
  4. Tap the btntilda.gif (1192 bytes) key one time. The Graph Menu will appear.
  5. Single left click on Study.
  6. Single left click on Directional Indicator. A Directional Indicator study will appear in the lower portion of the chart.
  7. Single left click on Done. Your chart will look like the one in Figure 5.
A chart can be split as many times as you would like.

Figure 5

[ ] Add a Study                  Top of Page

Aspen Graphics allows you to view multiple studies on a chart. To add an ADX study to a Directional Indicator, follow these steps:

  1. Display a Directional Indicator as in the previous section.
  2. Tap the btntilda.gif (1192 bytes) key one time. The Graph Menu will be displayed.
  3. Single left click on Study. The Select Study menu will be displayed.
  4. Single left click on Add a Study. An X will appear in the square brackets.
  5. Single left click on Average Directional Index. An ADX study will appear on the chart.
  6. Single left click on Done. The Select Study menu will disappear.
  7. Tap the btntilda.gif (1192 bytes) key one time. The Graph Menu will appear.
  8. Single left click on Parameters. The Edit Studies menu (see Figure 6) will be displayed.

Figure 6

  1. Single left click on Average Directional Index. The Average Directional Index menu (Figure 7) will be displayed.

 

Figure 7

  1. Change the parameters of the ADX to suit your needs.
  2. When you are finished making changes, single left click on Draw. The ADX study will reflect the changes you have made.
  3. Single left click on Done. The Average Directional Index menu will disappear, and your chart should resemble Figure 8.
Figure 8 was created using the parameters in Figures 4 and 7.

Figure 8

Charting a Study on a Study                  Top of Page

Aspen Graphics allows you to calculate a study on a study by selecting First Study from the Price Menu. To calculate an RSI of a Momentum study, follow these steps:

  1. Type cht_1 btnEnter.gif (1425 bytes).
  2. Type an instrument, and tap btnEnter.gif (1425 bytes).
  3. Type .split btnEnter.gif (1425 bytes).
  4. Tap the btntilda.gif (1192 bytes) key one time. The Graph Menu will be displayed.
  5. Single left click on Study. The Select Study menu will be displayed.
  6. Single lift click on Momentum. A Momentum study will appear.
  7. Single left click on Add a Study. An X will appear in the square brackets.
  8. Single left click on Relative Strength Index.
  9. Single left click on Done.
  10. Tap the btntilda.gif (1192 bytes) key one time. The Graph Menu will be displayed.
  11. Single lift click on Parameters. The Edit Studies menu will be displayed.
  12. Single left click on Relative Strength Index. The RSI menu will appear.
  13. Single left click on the word Close. The Price menu will be displayed.
  14. Single left click on First Study.
  15. Single left click on Done. The RSI menu will disappear, and your chart should resemble Figure 9.

Figure 9

Deleting a Study

There are several ways to delete a study from a chart in Aspen. The method you use will depend on what other studies are also present in the chart window.

Removing an Overlay Study                  Top of Page

To remove a study which has been overlaid on a price chart (bar, tick, Candlesticks or Point & Figure), follow these steps:

  1. Single right click in the window containing the study you want to delete.
  2. Tap the btntilda.gif (1192 bytes) key one time. The Graph Menu will be displayed.
  3. Single left click on Parameters. The Edit Studies menu (Figure 10) will be displayed.

Figure 10

  1. Highlight but do not click on the study you want to remove then tap the Delete key one time. Single left click on Done from the Edit Studies menu.

Deleting a Study Window  

If you want to delete a study window from a split chart (see Figure 9), highlight the window you wish to delete and type .delete or press btnctrl.gif (1396 bytes)d (btnAlt.gif (1388 bytes)d for DOS systems). The window will be cleared from the screen and the chart will return to its original size.

Optional Studies                  Top of Page

Some selections on the Select Study menu may be "grayed-out." These are optional studies which are available by subscription. Aspen Graphics has an optional DeMark Studies package. With DeMark entitlement, you will be able to select the DeMark Studies… field on the Select Study menu and display these studies on your chart. Please see the Aspen Graphics supplement for DeMark Studies for directions on their use.

MESA studies are a group of indicators developed by John Ehlers. Maximum Entropy Spectrum Analysis, or MESA, studies also have supplemental documentation.

The Implied Volatility study is available to those users subscribing to either the Basic or Aspen Options packages. Contact your salesperson for information on these supplementary packages.

Formulas                  Top of Page

Aspen Graphics also gives you the ability to create, customize, and chart formulas. The formulas in your Formula Listing which contain a (series) or (input) between the formula name and the equal sign will be displayed in this submenu. From the Select Study menu, single left click on Formulas . . . to access those custom formulas.

Description of the Studies

The Overlays and Studies listed on the Select Study menu can be categorized into four groups:

Trend Followers:                  Top of Page

Moving Averages Parabolic
Moving Average Env. Keltner Channels
Bollinger Bands  

Overbought/Oversold Indicators:                  Top of Page

Momentum Modified Stochastic
A/D Oscillator MACD
Acceleration Williams’ %R
Fast Stochastic MACD Osc.
Slow Stochastic Relative Strength Index
Momentum Commodity Channel Index
Moving Avg. Osc. HiLo Oscillator

Trend Indicators:

Directional Indicator
Directional Oscillator
Average Directional Index

Activity Indicators:                  Top of Page

Volume Cumulative Volume
Open Interest Volume Accum. Oscillator
On Balance Volume Variable Acc/Distribution
Average Balance Volume Historical Volatility

The following section describes these indicators in more detail. They are arranged in alphabetical order. Examples of color rules and alarms based on these indicators are given at the end of each section. For more information on entering color rules and alarms, see the Formulas, Color Rules and Alarms chapter.

MESA, DeMark and Implied Volatility studies are not outlined here. They are available as optional packages which integrate seamlessly into the Aspen Graphics program. Each package comes with its own documentation detailing these studies. Contact your salesperson for more information.

Acceleration                   Top of Page

What it Does:

Acceleration is the difference between the current momentum value and a previous momentum value. While a momentum study indicates the rate at which prices change, an acceleration study indicates the rate of change in momentum. When an acceleration study yields a positive value, prices are not only rising, they are also rising at a faster rate. When an acceleration study yields a negative value, prices are falling at a faster rate.

For information on how momentum is calculated, see the Momentum section.

Divergence between momentum and acceleration, or price and acceleration, are other uses of this study. If momentum is decreasing while acceleration is unchanged or increasing, momentum may soon be changing directions; the converse is also true.

Type of Study

Keyboard Command

It works best in...…

Overbought/ Oversold .acc Cash and Futures markets, all time frames

Table 1

How Aspen Calculates It:

Acceleration is:

Current Momentum - Momentum n periods ago

The user determines how many periods should be used in each of the Momentum studies. This is done from the Period field in the study’s parameter menu.

 

Figure 11

At the end of November and beginning of December on the chart in Figure 11, price was still rising but acceleration was falling. This divergence was a signal that the end of the uptrend was near. A high was soon hit, and price began to drop.

Default Parameters Settings:

Figure 12

Custom Aspen Formula:

Accl(series,per=10)=mom($1,10)-mom($1,10)[per]

This formula, once entered in the Formula Listing, allows you to use Acceleration in color rules and alarms, as shown in the following examples.

If charting this custom formula, make sure that Nogaps=On in the Chart Settings Menu.

Color Rule Example:

if(Accl($1,10)>Accl($1,10)[1] and mom($1,10)<mom($1,10)[1],clr_blue,clr_yellow)

.This color rule will turn a bar blue when the 10-period acceleration is increasing and the 10-period momentum is decreasing. It will leave all other bars yellow.

Alarm Example:

chart((Accl(c#,10)>Accl(c#,10)[1] and Accl(c#,10)[1]>Accl(c#,10)[2])[-1],15,1,100,1,1)

The alarm will trigger when the Acceleration has increased over the last two periods. The alarm is based on 15-minute bars for the front month of corn.

Charting Setup Idea:

Oscillators, such as Acceleration, are sometimes graphed as histograms rather than as line charts. To draw this study as a histogram, bring up the Acceleration study on a chart. Bring up a Graph Menu, select Parameters, and then single left click on the word Line in the Graph field. Select Histogram, and then select Done.

A color rule can be written to display all positive values in green (or any other color) and all negative values in red by entering the following color rule:

if($1>0,clr_green,clr_red)

Accumulation/Distribution (A/D) Oscillator                   Top of Page

What it Does:

The A/D Oscillator indicates overbought/oversold conditions by comparing "buying power" and "selling power" to the period’s trading range. This study was developed by Larry Williams and Jim Waters as a way of "normalizing" the relationship between the open and closing prices with the extreme prices for the period.

Type of Study

Keyboard Command

It works best in...…

Overbought/ Oversold .ado Cash and Futures markets that are trending.

Table 2

How Aspen Calculates It:

The A/D Oscillator is calculated as follows:

Buying Power + Selling Power
            2 * True Range

This study defines "buying power" as the difference between the true high (the higher of the current high or the previous close) and the period’s open. Selling power is defined as the difference between the close and the period’s true low (the lesser of the current low or the previous close).

The A/D Oscillator values are not smoothed by averaging the values of several periods (as with a moving average), so the oscillator often fluctuates wildly between 0 and 100. To make this study easier to read, a moving average can be applied to the A/D Oscillator, and overbought/oversold zones can be applied to this moving average.

Default Parameters Settings:

Figure 13

Custom Aspen Formula:

ADOsc(series)=100*(($1.thigh-$1.open)+($1.close-$1.tlow))/ (2*$1.trange)

This formula, once entered in the Formula Listing, allows you to use the A/D Oscillator study in color rules and alarms as shown in the following examples.

Color Rule Example:

if(ADOsc($1)>90 or ADOsc($1)<10,clr_red,clr_yellow)

This color rule will turn a bar red when the value of the A/D Oscillator is over 90 or less than 10 and leave all other bars yellow.

Alarm Example:

chart((eavg(ADOsc(lhq7),6)>70 or eavg(ADOsc(lhq7),6)<30),1,2,100,1,3)

This alarm will trigger if, at the end of the day, the 6-period exponential moving average of the A/D Oscillator is above 70 or below 30. The alarm is based on daily bars of the August ’97 lean hog contract.

Charting Setup Idea:

Oscillators are sometimes graphed as histograms rather than as line charts.

To draw this study as a histogram, see the Charting Setup Idea section at the end of the Acceleration study.

Average Balance Volume                   Top of Page

What it Does:

Average Balance Volume is a simple moving average of the On Balance Volume which smoothes out that study. The uses of the Average Balance Volume study, and the signals to be derived from it, are identical to the On Balance Volume study. See the On Balance Volume study later in this Studies chapter.

Type of Study

Keyboard Command

It works best in...

Activity Indicator .abv Cash and Futures markets which are active, all time frames

Table 3

How Aspen Calculates It:

The Average Balance Volume study is calculated as follows:

Simple moving average of the On Balance Volume

Just like the On Balance Volume, the Average Balance Volume study uses an arbitrary positive integer as a starting point for the calculations. For this reason, the Custom Aspen Formula may not have the same value as the Average Balance Volume that is preprogrammed in Aspen Graphics; the extent of your database may also have an effect on this value. The shape of the graph, however, should look the same. As mentioned later in the On Balance Volume section, the shape of the line is the most important aspect of these studies.

Default Parameters Settings:

Figure 14

Custom Aspen Formulas:

OBVol(series)=if($1.close>$1.prev,obvol[1]+

$1.volume,if($1.close<$1.prev,obvol[1]-$1.volume,obvol[1]))

ABVol(series)=savg(OBVol($1),10)

These formulas, once entered in the Formula Listing, allow you to use the Average Balance Volume study in color rules and alarms as shown in the following examples.

Color Rule Example:

if(ABVol($1)>ABVol($1)[1] and ABVol($1)[1] >ABVol($1)[2] and ABVol($1)[2]> ABVol($1)[3],clr_green,

if(ABVol($1)<ABVol($1)[1] and ABVol($1)[1] <ABVol($1)[2] and ABVol($1)[2] <ABVol($1)[3],clr_red,clr_yellow))

This three-part color rule will turn a bar green when the Average Balance Volume has increased for three consecutive periods; it will turn a bar red when the Average Balance Volume has declined for three consecutive periods, and it will leave all other bars yellow.

Alarm Example:

chart((ABVol(sp#)>ABVol(sp#)[1] and sp#<sp#[1]) or (ABVol(sp#)<ABVol(sp#)[1] and sp#>sp#[1])[-1],30,1,100,1,3)

This alarm will trigger when the direction of the Average Balance Volume line is diverging from price action. The alarm is based on 30-minute bars of the current S&P contract.

Charting Setup Idea:

When graphed, the Average Balance Volume can sometimes appear as a type of oscillator. It can, like other oscillators, be graphed as a histogram rather than as a line chart. To draw this study as a histogram, see the Charting Setup Idea section at the end of the Acceleration study.

Average Directional Index (ADX)                   Top of Page

What it Does:

The Average Directional Index, often referred to as the Average Directional Movement Index or ADX, indicates the strength of a trend by measuring the degree of directional movement up or down. The ADX fluctuates between 0 and 100, with the higher values reflecting stronger trends. The ADX is designed to be used with the Directional Indicator, and is often displayed as an overlay on top of this study. Together, these two studies are often considered a Directional Movement System.

Type of Study

Keyboard Command

It works best in...

Trend Indicator .adx Cash and Futures markets, all time frames

Table 4

When the ADX line has risen above both the DI+ and DI- lines and then makes its first down turn, a trend reversal is often indicated. When the ADX line goes below the DI+ and DI- lines, it is a sign that trend-following systems should not be used; the market has entered a sideways or choppy phase.

For details on how to overlay the ADX on the Directional Indicator, see Add A Study earlier in the Studies section.

 

How Aspen Calculates It:

The Average Directional Index study is calculated like this:

100 * DI+ minus DI-
              DI+ plus DI-

The above value is referred to as the DX. A modified moving average of the DX is then taken, and this is referred to as the Average Directional Index or ADX.

For an explanation of how the DI+ and DI- values are calculated, see the Directional Indicator study.

Figure 15 shows the ADX overlaid onto the Directional Indicator. Although the ADX is usually displayed as a solid line, it is shown here as a dotted line to distinguish it from the DI+ and DI- lines.

In mid-March, the DI+ line was significantly above the DI- line signifying a strong uptrend. The ADX crossed above the DI+ line but soon turned down, predicting a reversal. This prediction was soon confirmed by price action as the market broke.

Note also that when the ADX dropped below both lines in mid-April, it corresponded to the sideways movement of the market. The ADX then reversed direction and turned up as a new uptrend began.

Figure 15

Default Parameters Settings:

Figure 16

Related Aspen Function: adx( )

Example: adx($1,14)

Key to Examples
$1 is a  placeholder for a symbol that will be supplied later
14 stands for the number of periods in the ADX study.

This function allows you to use the Average Directional Index study in color rules and alarms as shown in the following examples.

Color Rule Example:

if(adx($1,14)>dmineg($1,14) and adx($1,14)>dmipos($1,14) and adx($1,14)<adx($1,14)[1] and adx($1,14)[1]>adx($1,14)[2],clr_red,clr_yellow)

This color rule will turn a bar red when the ADX line is above both the DI+ and DI- lines and it has just turned down. All other bars will remain yellow.

Alarm Example:

chart((adx(mu,14)>dmineg(mu,14) and adx(mu,14)>dmipos(mu,14) and adx(mu,14)<adx(mu,14)[1] and adx(mu,14)[1]>adx(mu,14)[2]),1,2,100,1,1)

This alarm will trigger at the end of the day for the same condition as described in the color rule above. The alarm is based on daily values for Micron stock.

Formula Example:

ADX_Ovrly(input)=adx($1,14)

This custom formula benefits those who regularly overlay the ADX study on top of the Directional Indicator study. Once entered in the Formula Listing menu, it can be accessed from the Select Studies menu by selecting Formulas…

Bollinger Bands                   Top of Page

What it Does:

This study was developed by John Bollinger based on his theory that the band width of an envelope should be a function of a market’s volatility.

Bollinger Bands are similar to the Moving Average Envelope and Keltner Channel studies. The difference lies in the method used to calculate how far the bands should be drawn above and below the moving average line. Bollinger Bands are based on the number of standard deviations above and below the moving average.

Type of Study

Keyboard Command

It works best in...…

Trend Follower .bb Cash and Futures markets in all time frames, with daily being the most popular.

Table 5

Figure 17

 

Figure 17 highlights several important aspects of Bollinger Bands. They are as follows:

  1. The moving average usually gives support in bull markets or resistance in bear markets (as in Figure 17).
  2. Penetration of a band usually signals the continuation of a trend, not the end of the trend (note the first breakout in early February).
  3. After the bands tighten around the average (indicating volatility has decreased), a sharp move is usually on the way (note how the bands constricted at the end of January before the big rally began).
  4. Tops/bottoms falling outside the bands followed by tops/bottoms inside the bands usually signal that a trend reversal is imminent (note the double top in early February).

Bollinger Bands can also be used to spot exhaustion of a trend. Exhaustion can be indicated by a sharp move outside the bands followed immediately by a retracement.

Default Parameters Settings:

Figure 18

Related Aspen Functions:

bb( ) Example: bb($1,20,2) Top Band
                          bb($1,20,-2) Bottom Band

Key to Examples
$1 is a  placeholder for a symbol that will be supplied later
20 stands for the number of periods in the moving avg.
2,-2 stand for the number of standard deviations above or below the moving average.

This function allows you to use Bollinger Bands in color rules and alarms, as in the following examples.

Color Rule Example:

if($1.high>bb($1,20,2,clr_red,if($1.low<bb($1,20,-2),clr_green,clr_yellow))

This three-part color rule will turn a bar red when the high price of that bar penetrates the top Bollinger band, green when a bar penetrates the lower Bollinger band, and all other bars will remain yellow.

A Bollinger Band study does not need to be on the chart to use this color rule.

Alarm Example:

chart((us#.high>bb(us#,20,2) or us#.low<bb(us#,20,-2))[-1],1,2,100,1,1)

This alarm will trigger when either the top or bottom Bollinger Band is penetrated. The alarm is based on daily bars for the front month of bonds.

Commodity Channel Index (CCI)                   Top of Page

What it Does:

The CCI measures how far away a price is from its average. In any given market, 70 to 80 percent of random price fluctuations should fall within the +100 to -100 range of the CCI. If the CCI yields a value above +100, a long position may be indicated. When the CCI value falls back below +100, closing a long position should be considered. The same is true for short positions. When the CCI falls below -100, it is an indication to go short. It is also an indication to cover your short position when the CCI rises above -100.

Type of Study

Keyboard Command

It works best in...

Overbought/ Oversold .cci Cash and Futures markets that trade in cyclical patterns

Table 6

How Aspen Calculates It:

The Commodity Channel Index is calculated as follows:

High,Low,Close avg-Current Simple Moving Avg
                   .015 * Mean Deviation

The CCI study on the chart in Figure 19 shows how it can be used to time a short position. If a short position was initiated in late April 1997 when the CCI dipped below -100 and was reversed when the CCI climbed back above -100 at the end of the month, the entire downtrend during that period could have been captured.

 

Figure 19

Default Parameters Settings:

Figure 20

Related Aspen Functions: cci( )

Example: cci($1,7)

Key to Examples
$1 is a  placeholder for a symbol that will be supplied later
7 stands for the number of periods in the CCI.

This function will allow you to use the Commodity Channel Index study in color rules and alarms as shown in the following examples.

Color Rule Example:

if(cci($1,14)>125,clr_green,if(cci($1,14)<-125,clr_red,clr_yellow))

This three-part color rule will turn a bar green when the CCI has a value over 125 and will turn a bar red when the CCI has a value under -125; all other bars will remain yellow.

Alarm Example:

chart((cci(o#,7)>125 or cci(o#,7)<-125)[-1],1,2,100,1,3)

This alarm will trigger when the 7-period CCI is over 125 or under -125. The alarm is based on daily bars of the front month of oats.

Charting Setup Idea:

Oscillators like the CCI are sometimes graphed as histograms rather than as line charts. To draw this study as a histogram, see the Charting Setup Idea section at the end of the Acceleration study.

Cumulative Volume                   Top of Page

What it Does:

Cumulative Volume is a weighted version of the On Balance Volume study. It adds or subtracts a prorated portion of the current volume to the previous Cumulative Volume value. The result is a weighted volume accumulator. On intraday charts, the accumulated tick volume for the period is used.

Type of Study

Keyboard Command

It works best in...

Activity Indicator .cvl Active Cash and Futures markets, all time frames

Table 7

How Aspen Calculates It:

The Cumulative Volume study is calculated as follows:

((Current Price - Previous Price) * Volume) + the previous Cumulative Volume value

Just like the On Balance Volume, the Cumulative Volume study uses an arbitrary positive integer as a starting point for the calculations. For this reason, the Custom Aspen Formula may not have the same value as the Cumulative Volume that is pre-programmed in Aspen Graphics; the extent of your database may also have an effect on this value. The shape of the graph, however, should look the same. As mentioned in the On Balance Volume section, the shape of the line is the most important aspect of these studies.

Figure 21

Default Parameters Settings:

Figure 22

Custom Aspen Formula:

CumVol(series)=CumVol[1]+(($1-$1[1]) *$1.volume)

This formula, once entered in the Formula Listing, allows you to use the Cumulative Volume study in color rules and alarms as shown in the following examples.

Color Rule Example:

if(CumVol($1)>CumVol($1)[1] and CumVol($1)[1] >CumVol($1)[2] and CumVol($1)[2]> CumVol($1)[3],clr_green,if(CumVol($1)
<CumVol($1)[1] and CumVol($1)[1]
<CumVol($1)[2] and CumVol($1)[2]
<CumVol($1)[3],clr_red,clr_yellow))

This three-part color rule will turn a bar green when the Cumulative Volume has increased for three consecutive periods; it will turn a bar red when the Cumulative Volume has declined for three consecutive periods, and it will leave all other bars yellow.

Alarm Example:

chart((if(CumVol(sp#)>CumVol(sp#)[1] and sp#<sp#[1] or CumVol(sp#)<CumVol(sp#)[1] and sp#>sp#[1])[-1],30,1,100,1,3)

This alarm will trigger when the direction of the Cumulative Volume line is diverging from price action. The alarm is based on 30-minute bars of the S&P’s.

Charting Setup Idea:

The Cumulative Volume study can sometimes appear as a type of oscillator. It can, like other oscillators, be graphed as a histogram rather than as a line chart. To draw this study as a histogram, see the Charting Setup Idea section at the end of the Acceleration study.

Directional Indicator (DMI)                   Top of Page

What it Does:

The Directional Indicator is used to determine if the market is in trend mode. This makes it one of the few studies that doesn’t simply follow a trend, but identifies the presence, strength and direction of a trend. It is often referred to as the DMI.

Type of Study

Keyboard Command

It works best in...

Trend Indicator .dm Cash and Futures markets, all time frames

Table 8

How Aspen Calculates It:

Two lines make up the Directional Indicator: the DI+ line and the DI- line. These lines measure the greatest part of the current price range that lays outside of the previous price range. A value is assigned either to the directional movement up (+DM) or to the directional movement down (-DM) for any given period; the other value is set to zero. For example, if the difference between the current and previous high is 8 points and the difference between the current and previous low is 5 points, we say that the directional movement up is eight, and the directional movement down is zero.

The DI+ and DI- lines are plotted together. When the DI+ is above the DI-, a long position is indicated, and when the DI- is above the DI+, a short position is indicated.

 

+DM = current high - previous high
-DM = current low - previous low

If +DM>-DM, then -DM = 0
If -DM>+DM, then +DM = 0

If the current range equals or lays within the

previous range, both +DM and -DM = 0.

The DI+ Line is:

  (modified moving avg of the +DM) * 100
modified moving avg of the Avg True Range

The DI- Line is:

   (modified moving avg of the -DM) * 100
modified moving avg of the Avg True Range

Because the directional movement is divided by the instrument’s average true range, the Directional Indicator is "normalized," which means you can use it to compare instruments across markets and in different trading ranges.

On the chart in Figure 23, the Directional Indicator is signaling a long position until the middle of March. The study indicates that this position should be closed when the DI+ line (on top) crosses below the DI- line. A new long position taken on April 9, when the DI+ line once again rose above the DI- line, would have kept you in the market to enjoy the April/May rally which followed.

Figure 23

Default Parameters Settings:

Figure 24

Related Aspen Functions:

dmineg( ) DI- line Example: dmineg($1,14)
dmipos( ) DI+ line Example: dmipos($1,14)

Key to Examples
$1 is a  placeholder for a symbol that will be supplied later
14 stands for the number of periods in the DMI study.

These functions allow you to use the DI- and DI+ lines of the Directional Indicator study in color rules and alarms as shown in the following examples.

Color Rule Example:

if(dmipos($1,14)>=dmineg($1,14),clr_green,clr_red)

This color rule will turn all bars green when the DI+ line is above or equal to the DI- line and will color all bars red when the DI+ line is below the DI- line.

Alarm Example:

chart((abs(dmipos(kc#,14)-dmineg(kc#,14))>=15)[-1],1,2,100,1,1)

This alarm will trigger when there is a spread of at least 15 points between the DI+ and the DI- lines. The alarm is based on daily bars for the front month of coffee futures.

Charting Setup Idea:

This study can be used by itself or in conjunction with the Average Directional Index as an indicator of trend strength. To overlay the Average Directional Index on top of this study, see the instructions for "Adding a Study" earlier in the Study chapter.

Directional OscilIator                   Top of Page

What it Does:

The Directional Oscillator combines the DI+ and DI- lines of the Directional Indicator (also known as the Directional Movement Index) into one line that fluctuates above and below zero. The signals generated by the Directional Oscillator and the Directional Indicator are identical. See Directional Indicator in this section for more information on the DI+ and DI- lines.

Type of Study

Keyboard Command

It works best in...

Trend Indicator .do Cash and Futures markets, all time frames

Table 9

How Aspen Calculates It:

The Directional Oscillator study is calculated as follows:

DI+ minus DI-

For an explanation of how the DI+ and DI- values are calculated, see the Directional Indicator study.

Default Parameters Settings:

Figure 25

Custom Aspen Formula:

DirOsc(series)=dmipos($1,14)-dmineg($1,14)

This formula will allow you to use the Directional Oscillator study in color rules and alarms.

Color Rule Example:

if(DirOsc($1,14)>=0,clr_green,clr_red)

This color rule will color all bars green when the Directional Oscillator is positive and will color all bars red when the Directional Oscillator is negative.

Alarm Example:

chart(((DirOsc(nscp)-DirOsc(nscp)[5])>=25)[-1],1,2,100,1,1)

This alarm will trigger when the Directional Oscillator has increased by at least 25 points over the last 5 days. The alarm is based on daily bars for Netscape stock.

Charting Setup Idea:

This study can be used in a chart window by itself, or it can be overlaid onto the Directional Indicator study. To view these two studies together, see the instructions for Add a Study in the beginning of this chapter.

Oscillators like the Directional Oscillator are sometimes graphed as histograms rather than as line charts. To draw this study as a histogram, see the Charting Setup Idea section at the end of the Acceleration study section.

HiLo Oscillator                   Top of Page

What it Does:

The HiLo Oscillator provides a measurement of directional movement. Periods which gap up or gap down will often register large positive and negative values on the HiLo Oscillator. This study takes the difference of the current period’s high and previous period’s close and divides it by the current period’s true range.

Type of Study

Keyboard Command

It works best in...

Overbought/

Oversold

.hlo Cash, Futures, and Options markets in all time frames and all market conditions.

Table 10

The true range is defined as the greater of the following three values:

The current high minus the previous close; The current high minus the current low; or The previous close minus the current low.

The HiLo Oscillator is plotted on a scale between -100 and 100, and like the A/D Oscillator, often fluctuates dramatically between these numbers. To make this study easier to read, a moving average can be applied to the HiLo Oscillator and overbought/oversold zones can be applied to this moving average.

 

How Aspen Calculates It:

The HiLo Oscillator is calculated as follows:

100 * Current High - Previous Close
                          True Range

Where True Range = true high - true low

Default Parameters Settings:

Figure 26

Custom Aspen Formulas:

HiLoOsc(series)=100*($1.high-$1.prev)/$1.trange

This formula allows you to use the HiLo Oscillator study in color rules and alarms as shown in the following examples.

Color Rule Example:

if(HiLoOsc($1)>90 or HiLoOsc($1)<-50,clr_red,clr_yellow)

This color rule will turn a bar red when the value of the HiLo Oscillator is over 90 or less than -50, and leave all other bars yellow.

 

Alarm Example:

chart(eavg(HiLoOsc(sm#1),6)>=70 or eavg(HiLoOsc(sm#1),6)<=30),1,2,100,1,3)

This alarm will trigger if, at the end of the day, the 6-period exponential moving average of the HiLo Oscillator is above 70 or below 30. The alarm is based on daily bars of the first month out soybean meal contract.

Charting Setup Idea:

Oscillators like the HiLo Oscillator are sometimes graphed as histograms rather than as line charts. To draw this study as a histogram, see the Charting Setup Idea section at the end of the Acceleration study.

Historical Volatility                   Top of Page

What it Does:

Historical Volatility is a measure of price fluctuation over time. This study measures the likelihood of certain price levels being reached. If a market has large price swings over time, it is considered to have high historical volatility. In such a market, it is more likely that higher highs and lower lows will be hit than in a market that doesn’t have such dramatic price swings.

Notice that Historical Volatility doesn’t predict the direction of price movement. Instead, it shows how much the price has changed over a range of recent prices, and this information can be used in predicting the likelihood of future price movements. For example, rising volatility in a market that has been moving sideways usually indicates that prices are ready to break out of their current trading range to either the up or down side. It is also the case that decreasing volatility signals a breakout as market makers may soon step in to infuse new activity into a consolidated market.

Type of Study

Keyboard Command

It works best in...

Activity Indicator .hvol Cash, Futures and Options markets, all time frames

Table 11

Figure 27

How Aspen Calculates It:

First identify the mean, and then calculate the standard deviation:

Formula:

Historical Volatility:

Where:

=standard dev, or historical volatility
n = number of occurrences (bars)
m = mean
xi = price changes

And:

Mean:

Where:
m = mean
n = number of occurrences
xi = price changes

And:

xi can equal percent of price change:

Or:

xi can equal natural logarithmic price change:

Default Parameters Settings:

Figure 28

Related Aspen Function: hvol( )

Examples:

hvol($1,10,1,253,0)
hvol($1,10)

Key to Examples
$1 is a  placeholder for a symbol that will be supplied later
10 stands for the number of periods in the Hist. Vol. study
1 stands for the number of standard deviations
253 stands for the number of trading periods in a year
0 stands for the base 100 value. 0 is default; 100 needs to be used only when the hvol
function is surrounded by the chart() function.

This function allows you to use the Historical Volatility study in color rules and alarms as shown in the following examples.

Color Rule Example:

if(hvol($1,10)<5,clr_cyan,clr_yellow)

This color rule will change a bar to cyan when the historical volatility drops below five percent and will leave all other bars yellow.

Alarm Example

chart((hvol(sp#,10)>25)[-1],1,2,100,1,1)

This alarm will trigger when the historical volatility for the front month of the S&P’s exceeds 25. The alarm is based on daily bars.

Formula Example:

hsvol(series)=hvol($1,6)/hvol($1,100)

In their book, Street Smarts, Linda Raschke and Larry Connors describe an indicator in which the six-day historical volatility is divided by the 100-day historical volatility. The formula above, once entered in the Formula Listing, will allow you to chart this indicator. From the Select Study menu, single left click on Formulas…and then select hsvol from the Select Formula Study menu.

Keltner Channels                   Top of Page

What it Does:

This study was developed by Chester W. Keltner and is similar to the Moving Average Envelope and Bollinger Band studies. The difference lies in the method used to calculate how far the bands should be drawn above and below the moving average line. Keltner Channels are drawn above and below the moving average at a distance which is the weighted 10-period moving average of the true range multiplied by a constant.

Type of Study

Keyboard Command

It works best in...…

Trend Follower .keltner Cash and Futures markets that are trending.

Table 12

Default Parameters Settings:

Figure 29

Related Aspen Functions: keltner( )

Example:

keltner($1,10,1) Upper Channel (default parameters)
keltner($1,10,-1) Lower Channel (default parameters)

Key to Examples
$1 is a  placeholder for a symbol that will be supplied later
10 stands for the number of periods in the moving average
1,-1 stands for the multiplier for the Upper and Lower Channels.

Color Rule Example:

if($1.high>keltner($1,10,1),clr_red,if($1.low<keltner($1,10,-1), clr_green,clr_-yellow))

This three-part color rule will turn a bar red when the high price of that bar penetrates the top Keltner Channel, green when it penetrates the lower Keltner Channel, and will leave all other bars yellow.

Alarm Example:

chart((msft.high>keltner(msft,10,1) or msft.low<keltner(msft,10,-1))[-1],1,2,100,1,1)

This alarm will trigger when either the top or bottom Keltner Channel for Microsoft is penetrated. The alarm is based on daily bars.

Moving Average Convergence Divergence (MACD)     Top of Page

What it Does:

The MACD study measures overbought or oversold conditions. The MACD differs from the Moving Average Oscillator in that it uses two moving averages of the same average type (exponential) but different number of periods.

Type of Study

Keyboard Command

It works best in...…

Overbought/

Oversold

.macd Cash and Futures markets with wide trading ranges, and at the end of strong trends.

Table 14

How Aspen Calculates It:

Moving Average Convergence Divergence (MACD) is as follows:

MACD Line = short term Exponential Moving Average with smoothing factor minus long term Exponential Moving Average with smoothing factor.

Signal Line = Exponential Moving Average of the MACD line.

Overbought and oversold conditions are indicated where the MACD line crosses above or below its moving average. These crossovers must occur above or below certain levels for the signal to be valid.

Bull markets are often indicated when the MACD line is above the signal line and rising; it is just the opposite for bear markets. These are only generalizations; the strongest signals are produced in volatile or trending markets.

Figure 30

Default Parameters Settings:

Figure 31

Note that the periods for the MACD are expressed differently than in other studies. This is because the number of periods are related to the smoothing factor 2/(n+1), where n is the number of periods in the moving average. When you enter a value in the Period field, you can enter either a whole number for the number of periods or a decimal value for the smoothing factor. It’s automatically converted for you, as shown in Table 15.

If you enter this value in Periods field:

Aspen calculates the number of periods (n) like this:

.1

1 = 2/(n+1)

1 = 20/(n+1)

1/20 = 1/(n+1)

20 = n+1

19 = n so Periods = 19

.2

2 = 2/(n+1)

2 = 20/(n+1)

1/10 = 1/(n+1)

10 = n+1

9 = n so Periods = 9

.3

3 = 2/(n+1)

3 = 20/(n+1)

3/20 = 1/(n+1)

20/3 = n+1

17/3 = n so Periods = 5.67

Table 15

Custom Aspen Formulas:

MACD_(series)=eavg($1,.2)-eavg($1,.1)
Signal_Line(input)=eavg(macd_($1),.3)

These formulas, once entered in the Formula Listing, allow you to use MACD study in color rules and alarms as shown in the following examples.

Color Rule Example:

if(MACD_($1)>MACD_($1)[1] and MACD_($1)>Signal_Line($1),clr_green, if(MACD_($1)<MACD_($1)[1] and MACD_($1)<Signal_Line($1),clr_red,clr_yellow))

This three-part color rule will turn the bars green where the MACD line is rising and it is above the Signal line. Where the MACD line is falling and it is below the Signal line, the bars will be red. All other bars will be yellow.

Alarm Example:

chart((MACD_(w#)>=Signal_Line(w#))[-1],30,1,100,1,3)

(make sure to set Trigger When State: to Changes)

This alarm will trigger each time the MACD line crosses the Signal line for the front month of wheat. The alarm is based on 30-minute bars.

MACD Oscillator                   Top of Page

What it Does:

The MACD Oscillator converts the two lines of the MACD into a single line that fluctuates above and below zero. The MACD Oscillator is calculated by subtracting the Signal Line value from the MACD Line value. When the MACD Line crosses the Signal Line, the MACD Oscillator displays a value of zero, and a buy or sell signal is generated. The signals provided by the MACD and the MACD Oscillator are identical.

Type of Study

Keyboard Command

It works best in...…

Overbought/

Oversold

.macdo Cash and Futures markets with wide trading ranges and at the end of strong trends.

Table 16

How Aspen Calculates It:

The MACD Osc is: MACD Line minus Signal Line

MACD Line = short term Exponential Moving Average with smoothing factor minus long term Exponential Moving Average with smoothing factor.

Signal Line = Exponential Moving Average of the MACD Line

The MACD Oscillator study may indicate oversold conditions when it crosses above the "zero line." When the oscillator moves back below zero again, overbought conditions may be indicated.

Figure 32

Default Parameters Settings:

Figure 33

Note that the periods for the MACD Oscillator are expressed just like the MACD study, which are different from the other studies in Aspen Graphics. For an explanation of how these periods are calculated, see the Default Parameters Settings for the MACD study in the previous section.

Custom Aspen Formulas:

MACD_(series)=eavg($1,.2)-eavg($1,.1)

Signal_Line(input)=eavg(macd_($1),.3)

MACD_Osc(series)= MACD_($1)-Signal_Line($1)

These formulas, once entered in the Formula Listing, allow you to use the MACD Oscillator study in color rules and alarms, as shown in the following examples.

Color Rule Example:

if((MACD_Osc($1)>=0 and MACD_Osc($1)[1]<0),clr_green, if((MACD_Osc($1)<=0 and MACD_Osc($1)[1]>0),clr_red,clr_yellow))

This three-part color rule will turn the bar green where the MACD Oscillator has changed to a positive value; it will turn the bar red where the MACD Oscillator has changed to a negative value, and all other bars will remain yellow.

Alarm Example:

chart((MACD_Osc(c#)>=0)[-1],30,1,100,1,3)

(make sure to set Trigger When State: to Changes)

This alarm will trigger each time the MACD Oscillator line crosses the "zero" line for the front month of corn. The alarm is based on 30-minute bars.

Charting Setup Idea:

Oscillators are sometimes graphed as histograms rather than as line charts. To draw this study as a histogram, see the Charting Setup Idea section at the end of the Acceleration study.

Momentum                   Top of Page

What it Does:

Momentum is the difference between the current price and a previous price. Momentum indicates the rate of change in prices and helps determine when a trend is "running out of steam." If prices are going up but momentum is falling, prices are expected to rise less quickly, signaling that the current trend may be coming to an end.

The Momentum study can generate buy signals. When momentum has been negative and then becomes positive, a buy may be indicated if this is also the direction of the current trend.

Divergence between momentum and price is another important use of this study. A down trend may be coming to an end if prices make new lows, but momentum makes higher lows; the same is true for an up-trend when price and momentum diverge.

Type of Study

Keyboard Command

It works best in...…

Overbought/

Oversold

.mom Cash and Futures markets, all time frames

Table 13

How Aspen Calculates It

Momentum is: Current Price - Price n periods ago

The user determines which price (i.e. how many bars back) should be subtracted from the current price.

Figure 34

The trendlines drawn on the chart in Figure 34 show divergence between price and momentum; price was going down while momentum was going up, and the downtrend was soon reversed.

Default Parameters Settings:

Figure 35

Related Aspen Functions: mom( )

mom( ) Example: mom($1,21)

The mom( ) function allows you to use Momentum in color rules and alarms as shown in the following examples.

Key to Examples
$1 is a  placeholder for a symbol that will be supplied later
21 stands for the number of periods in the momentum study.

Color Rule Example:

if(mom($1,21)>0 and mom($1,21)[1]<=0,clr_blue,clr_yellow)

This color rule will turn a bar blue when the 21-period momentum becomes positive.

Alarm Example:

chart((ip.high>ip.high[1] and ip.high[1]>ip.high[2] and mom(ip,10)<mom(ip,10)[1] and mom(ip,10)[1]<mom(ip,10)[2])[-1],15,1,100,1,1)

This alarm is monitoring divergence between price and momentum. The alarm will trigger when the high price of International Paper has increased over the last two periods while the 10-period momentum was falling during that same period. The alarm is based on 15-minute bars.

 

Formula Example:

LBR_RSI=chart(rsi(mom($1,1),3)[-1],1,2,100,1,3)

In their book Street Smarts, Linda Raschke and Laurence Connors talk about a trading technique they call "Momentum Pinball." This technique uses a 3-period RSI study on a 1-period Momentum study.

This combination can be easily charted in Aspen using the "Add a Study" option on the Select Study menu and the "First Study" price parameter.

The LBR_RSI can also be quoted on a quote page using the preceding formula.

Charting Setup Idea:

Oscillators such as Momentum are sometimes graphed as histograms rather than as line charts. To draw this study to a histogram, see the Charting Setup Idea section at the end of the Acceleration study.

Moving Averages                   Top of Page

What it Does:

Moving averages are smoothing techniques. They are the average price of an instrument over a certain number of periods. Faster moving averages are based on fewer periods, and slower moving averages are indicative of long-term trends. The strength of a trend is indicated by the steepness of the moving average’s slope.

Moving averages are always lagging indicators because they incorporate historical data. For this reason, they are used more to confirm that a change in trend has already taken place than as a way of predicting when a change will occur.

Type of Study

Keyboard Command

It works best in...…

Trend Follower .mav Cash and Futures markets that are trending.

Table 18

Aspen Graphics has five different types of moving averages. These five moving averages are listed and explained in Table 19.

Key to Table 19
P = current price, P1 = price ago, etc.
MAprev = previous moving avg. value
n = number of periods a = smoothing constant 2/(n+1)

 

Description

How Aspen Calculates It

Simple Moving Average

Average (mean) of data over n periods P+P1+…+P(n-1)

n

Modified Moving Average

Subtracts last moving average value instead of oldest data MAPrev+1/n(P-MAPrev)

Exponential Moving Average

Assigns more weight to newer data using a geometric formula P+a*P1+a2*P2+…+(an-1)*Pn-1

1+a+a2+…+a(n-1)

Weighted Moving Average

Assigns more weight to newer data using an arithmetic formula n*P+(n-1)*P1+(n-2)*P2+.+P(n-1)

1+2+3+…+n

Hamming Moving Average

Weights recent data much more heavily than older data using a sine wave curve function Proprietary; developed by Aspen Research Group

Table 19

Default Parameters Settings:

Figure 36

Related Aspen Functions:

savg( ) Simple Moving Avg. savg($1,21)

mavg( ) Modified Moving Avg. mavg($1,14,1)

eavg( ) Exponential Moving Avg eavg($1,10)

wavg( ) Weighted Moving Avg. wavg($1,52)

havg( ) Hamming Moving Avg. havg($1,5,1)

Key to Examples
$1 is a  placeholder for a symbol that will be supplied later
the 2nd number stands for the number of periods in the moving average.
The 3rd number (if present) will be the number of bars to shift the moving average.

Color Rule Example:

if(savg($1,5)<savg($1,5)[1] and savg($1,5)[1]>savg($1,5)[2],clr_green,clr_yellow)

This color rule will turn the bar green when a 5-period simple moving average reverses direction on a high (i.e. the current moving average value is less than the one before, and that value was greater than the moving average value two bars back).

Alarm Example:

chart((sp#.low>wavg(sp#,5))[-1],1,2,100,1,3)

This alarm will trigger when the low is higher than the 5-day weighted moving average.

Formula Example:

doubleEAVG(input)=eavg(eavg($1,14),14)

This formula can be charted as an overlay and produces a super-smooth double exponential moving average (a moving average of a moving average).

Moving Average Envelope                   Top of Page

What it Does:

The Moving Average Envelope study draws bands around a moving average to form a channel. The purpose of the bands is to show which prices are falling outside of the expected range.

The Moving Average Envelope study is very similar to the Bollinger Band and Keltner Channel studies; the difference lies in the method used to calculate how far the bands should be drawn above and below the moving average line. The Moving Average Envelope bands are drawn above and below the moving average at a distance which is a percentage of the moving average value. For example, if the value of the moving average at a particular bar is 100 and the Percent field is set to 0.5, the top and bottom bands will be drawn at 100.5 and 99.5.

Type of Study

Keyboard Command

It works best in...…

Trend Follower .env Cash and Futures markets that are trending

Table 20

Figure 37 shows a Moving Average Envelope around a 10-day simple moving average with bands set at 2% above and below the average.

 

Figure 37

Default Parameters Settings:

Figure 38

Custom Aspen Formulas:

EnvAverage(input,per=10)=savg($1,per)

EnvTop(input,per=10,prcnt=0.005)=savg($1,per)+prcnt*savg($1,per)

EnvBottom (input,per=10,prcnt=0.005)=savg($1,per)-prcnt*savg($1,per)

These formulas, once entered in the Formula Listing, allow you to use the Moving Average Envelope study in color rules and alarms, as shown in the following examples.

Color Rule Example:

if($1.high<EnvBottom($1) or $1.low>EnvTop($1),clr_red,clr_yellow)

This color rule will turn a bar red when the entire price range for that bar lies outside of the Moving Average Envelope.

Alarm Example:

chart((sp#.high<EnvBottom(sp#) or sp#.low>EnvTop(sp#))[-1],10,1,100,1,3)

This alarm will trigger when the entire price range lies outside of the Moving Average Envelope. The alarm is based on a 10-minute bar chart of the current S&P contract.

Moving Average Momentum                   Top of Page

What it Does:

The Moving Average Momentum study measures the rate of change of a moving average. It is very similar to the Acceleration study except that instead of comparing momentum values, this study compares moving average values.

Type of Study

Keyboard Command

It works best in...…

Overbought/ Oversold .mavmom Cash and Futures markets, all time frames.

Table 21

How Aspen Calculates It:

Moving Average Momentum is:

Current Moving Avg. - Moving Avg n periods back

Figure 39

 

Default Parameters Settings:

Figure 40

The user determines how many periods should be used in the moving average from the Mav. Periods field of the study’s parameter menu. The number of periods back to be compared against the current moving average value is determined in the Period field of the study’s parameter menu.

Custom Aspen Formulas:

MovAvgMom(series,per=5)=savg($1,10)-savg($1,10)[per]

This formula, once entered in the Formula Listing, allows you to use Moving Average Momentum in color rules and alarms as shown in the following examples.

Color Rule Example:

if(MovAvgMom($1)>1,clr_green,if(MovAvgMom($1)<-1,clr_red,clr_yellow))

This three-part color rule will turn a bar green when the Moving Average Momentum is greater than 1, red when the value is less than -1, and leave all other bars yellow. The color rule is based on a 10-period moving average.

Alarm Example:

chart(MovAvgMom(us#)<-1.5[-1],1,2,100,1,3)

The alarm will trigger when the Moving Average Momentum for the front month of bonds is less than -1.5. The alarm is based on daily bars.

Charting Setup Idea:

The Moving Average Momentum study is an oscillator. By default, the study is drawn as a line but can be graphed as a histogram or a variety of other methods. See the Charting Setup Idea at the end of the Acceleration section.

Moving Average Oscillator                   Top of Page

What it Does:

This study subtracts one moving average from another. The MACD study, which uses two moving averages of the same average type (exponential) but a different number of periods, is different from the Moving Average Oscillator. This study uses (as default) two different average types (simple and modified) with the same number of periods.

The emphasis of this study lies more in the difference between the two average types than in comparing long and short term trends. Comparing the trends is the job of the MACD.

Type of Study

Keyboard Command

It works best in...…

Overbought/ Oversold .mao Cash and Futures markets that are trending.

Table 22

How Aspen Calculates It:

The Moving Average Oscillator is:

Moving Avg#1-Moving Avg#2

The user determines the type of moving averages to be used and the number of periods in each moving average.

 

Default Parameters Settings:

Figure 41

Custom Aspen Formula:

MovAvgOsc(series)=savg($1,10)-mavg($1,10)

This formula, once entered in the Formula Listing, allows you to use Moving Average Momentum in color rules and alarms as shown in the following examples.

Color Rule Example:

if(MovAvgOsc($1)>0 and MovAvgOsc($1)>MovAvgOsc($1)[1], clr_red,clr_yellow)

This color rule will turn a bar red when the Moving Average Oscillator is positive and rising and will leave all other bars yellow.

Alarm Example:

chart((MovAvgOsc(s#)>MovAvgOsc(s#)[1] and MovAvgOsc(s#)[1]> MovAvgOsc(s#)[2] and MovAvgOsc(s#)[2]>MovAvgOsc(s#)[3])[-1], 1,2,100,1,3)

The alarm will trigger when the Moving Average Oscillator for the front month of soybeans has risen for the last three daily bars.

Charting Setup Idea:

The Moving Average Oscillator study is, by default, drawn as a line but can be graphed as a histogram or a variety of other methods; see the Charting Setup Idea at the end of the Acceleration section.

On Balance Volume                   Top of Page

What it Does:

On Balance Volume is a volume accumulator. All of the volume in an up-period (a period which closes higher than the previous period) is added to the previous On Balance Volume, while all of the volume in a down-period (a period which closes lower than the previous period) is subtracted from the previous On Balance Volume.

Type of Study

Keyboard Command

It works best in...

Activity Indicator .obv Cash and Futures markets which are active, all time frames

Table 23

The important aspect of this study is the direction and not the exact volume level of the On Balance Volume line. Divergence between price and the On Balance Volume can be a signal of trend reversal. This study can also lend some clues as to supply and demand as measured by the volume in up-periods and the volume in down-periods.

How Aspen Calculates It:

The On Balance Volume study is calculated as follows:

If the current close is greater than the previous close, all the volume for the period is added to the previous On Balance Volume. If the current close is less than the previous close, all the volume for the period is subtracted from the previous On Balance Volume.

The On Balance Volume uses an arbitrary positive integer as a starting point for the calculations. For this reason, the Custom Aspen Formula (below) may not have the same value as the On Balance Volume that is preprogrammed in Aspen Graphics. The extent of your database may also have an effect on this value. The shapes of the two graphs, however, should look the same.

Default Parameters Settings:

Figure 42