Investment Studio > Expressions > Functions > Indicator > ASI

float array[*][2] asi(float array[*][5] dohlc, float limit_move = 10000, float previous_asi = 0)

Returns a two-column array containing dates (first column) and corresponding Accumulation Swing Index (ASI) values (second column).

dohlc is a five-column array containing daily price quotes. Each row is structured as follows:

Column # Content
1 The quote date.
2 The day's open (first traded price).
3 The day's high (highest traded price).
4 The day's low (lowest traded price).
5 The day's close (last traded price).

The array is assumed to be time-sorted, with earlier dates preceding later dates.

Automatic type conversion allows the use of date strings as arguments instead of explicit date values.

limit_move enters the calculation of ASI values as an overall normalization factor (divisor). For assets with exchange-regulated limits on daily price moves, set this argument to the largest allowed daily move. For other assets, use an arbitrary value well in excess of any expected actual daily move. If omitted, limit_move defaults to 10 000.

previous_asi is the ASI value on the first date quoted in dohlc. If omitted, it defaults to 0.

ASI is defined as a cumulative sum of the Swing Index (SI):

today's ASI = yesterday's ASI + today's SI

previous_asi therefore acts as an overall offset, and is important only if ASI values need to be compared across different assets or date ranges, or with some other indicator (e.g. the underlying price).

Interpretation

The ASI shares the SI's property of summarizing four pieces of price data (open, high, low, close) in a single number. It was originally developed to provide a "truer" picture of the market's direction than that provided by a chart of either underlying price component.

In practice, ASI lines tend to track prices closely. To see just how closely, consider the price of Microsoft (NASD:MSFT) and the corresponding ASI (with limit move = 50) from June 1 to December 31, 2001:

The top chart shows prices in standard candlestick form. The bottom chart shows the corresponding ASI with limit_move = 50 and previous_asi = closing price on June 1 (black line) superimposed on daily closes (dark gray line).

The similarity between ASI charts and "plain" price charts means that all the usual technical paraphernalia (trend lines, reversal patterns) of price analysis applies. Trendlines drawn on the ASI charts are often used to validate trendline breakouts on the price chart. Signals are generated by breakouts past previous highs (buy) or lows (sell).

The ASI's inventor, Welles Wilder (New Concepts in Technical Trading Systems, 1978) introduced the following terminology:

A High Swing Point (HSP) is any day with an ASI higher than both the previous and following day.
A Low Swing Point (LSP) is any day with an ASI lower than both the previous and following day.
An upside breakout (buy signal) occurs when the ASI exceeds a previously significant HSP.
A downside breakout (sell signal) occurs when the ASI drops below a previously significant Low Swing Point.

Both upside and downside breakouts in the ASI must be confirmed by the price chart to be considered valid buy/sell signals.

Example

Assuming standard US date format settings,

=asi({{"1/1/1990", 100, 90, 98, 1000}, {"1/2/1990", 97, 84, 86, 858}})

returns {{32874, 0}, {32875, 3.10355263157895}}. 32874 is the date code for 1/1/1990; 0 is the ASI value for that date (taken from the implied previous_asi = 0). 32875 is the date code for 1/2/1990; 3.1... is the ASI value for that date, given the previous day's ASI (0) and the implied limit_move = 10 000.

See also di, dim, dip, dm, si, tp, tr, wad.