Accumulation/Distribution oscillator


ado = adosc(highp, lowp, openp, closep)
ado = adosc([highp lowp openp closep])
adots = adosc(tsobj)
adots = adosc(tsojb, 'ParameterName', ParameterValue, ...)



High price (vector)


Low price (vector)


Opening price (vector)


Closing price (vector)


Time series object


ado = adosc(highp, lowp, openp, closep) returns a vector, ado, that represents the Accumulation/Distribution (A/D) oscillator. The A/D oscillator is calculated based on the high, low, opening, and closing prices of each period. Each period is treated individually.

ado = adosc([highp lowp openp closep]) accepts a four-column matrix as input. The order of the columns must be high, low, opening, and closing prices.

adots = adosc(tsobj) calculates the Accumulation/Distribution (A/D) oscillator, adots, for the set of stock price data contained in the financial time series object tsobj. The object must contain the high, low, opening, and closing prices. The function assumes that the series are named High, Low, Open, and Close. All are required. adots is a financial time series object with similar dates to tsobj and only one series named ADOsc.

adots = adosc(tsobj, 'ParameterName', ParameterValue, ...) accepts parameter name-parameter value pairs as input. These pairs specify the name(s) for the required data series if it is different from the expected default name(s). Valid parameter names are

  • HighName: high prices series name

  • LowName: low prices series name

  • OpenName: opening prices series name

  • CloseName: closing prices series name

Parameter values are the strings that represent the valid parameter names.


collapse all

Calculate the Accumulation/Distribution Oscillator for a Stock

This example shows how to find the Accumulation/Distribution oscillator for Disney stock and plot the results.

load disney.mat
dis_ADOsc = adosc(dis);
title('A/D Oscillator for Disney')

Related Examples


Kaufman, P. J., The New Commodity Trading Systems and Methods, John Wiley and Sons, New York, 1987.

See Also


Introduced before R2006a

Was this topic helpful?