Investment Studio > Expressions > Functions > Indicator > ACD
float array[*][2] acd(float array[*][5] dhlcv, float previous_acd = 0)
Returns a two-column array containing dates (first column) and corresponding ACcumulation/Distribution (ACD) values (second column).
dhlcv is a five-column array containing daily price and volume quotes. Each row is structured as follows:
| Column # | Content |
| 1 | The quote date. |
| 2 | The day's high (highest traded price). |
| 3 | The day's low (lowest traded price). |
| 4 | The day's close (last traded price). |
| 5 | The day's volume (number of traded shares). |
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.
previous_acd is the ACD value on the trading date preceding the first date quoted in dhlcv. If omitted, it defaults to 0.
ACD is defined as a cumulative sum:
| (close - low) - (high - close) | ||
| ACD | = yesterday's ACD + volume | ¾¾¾¾¾¾¾¾¾¾¾¾ |
| high - low |
previous_acd therefore acts as an overall offset, and is important only if ACD values need to be compared across different assets or date ranges.
Interpretation
ACD is a cumulative measure of value flows. A fraction of the day's volume is added to or subtracted from the running total. The fraction is proportional to the distance between the closing price and the midpoint between the day's high and low: it's 100% if the closing price is the day's high, it's -100% if the closing price is the day's low, it's 0 if the closing price lies exactly in the middle of the day's price range.
The daily change in ACD is a guesstimate of the direction and strength of the net value flow in the asset under study. When ACD moves up, most new volume is assumed to be associated with upward price movement (accumulation); when ACD moves down, most new volume is assumed to be associated with downward price movement (distribution).
Note that this is not a strict result. ACD is mainly useful in the absence of tick-by-tick data showing the price and number of shares traded in each transaction over the course of the trading day (and hence the actual net flow in the asset) or at least of actual upside/downside volume data. See the closely related OBV and PVT for an alternate guesstimate.
Technicians use ACD to validate price trends. A divergence (the ACD turning down in an upward price trend, or the ACD turning up in a downward price trend) is considered a warning of an impending trend reversal. Conversely, a price trend reversal is looked upon with suspicion until it's confirmed by an ACD trend reversal.
Note that the absolute value of the ACD is arbitrary, since the ACD is a running sum which can start anywhere and at any level. It therefore makes no sense to look for (say) zero crossings in an ACD chart, like it might do in a chart of EFI (which is not cumulative). What matters in ACD charts is slope.
For a real life example, consider Borland Software Corporation (NASD:BORL) in the years 1990 through 1992:

In mid-April 1991, the price hit a first major high and went on to trace out an ominous head-and-shoulder pattern (see red circle in top graph). But while this was going on, the ACD just kept moving higher (see red circle in bottom graph), contradicting the price action's message of an impending trend reversal.
This turned out to be correct: after a period of consolidation, the rally resumed with renewed strength and ultimately peaked on January 2, 1992. In spite of large price volatility, the ACD then flatlined for almost three months, reflecting the drying up of volume typical of major market tops.
The end of the bull run in BORL was finally confirmed in the last week of March 1992, when both the price and the ACD turned decisively down.
Example
Assuming standard US date format settings,
=acd({{"1/1/1990", 100, 90, 98, 1000}, {"1/2/1990", 97, 84, 86, 858}})
returns {{32874, 600}, {32875, 6}}. 32874 and 32875 are the date codes for 1/1/1990 and 1/2/1990. You can easily verify that
600 = 1000 * ((98 - 90) - (100 - 98)) / (100 - 90)
and
6 = 600 + 858 * ((86 - 84) - (97 - 86)) / (97 - 84)