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
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
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
object must contain the high, low, opening, and closing prices. The
function assumes that the series are named
Close. All are required.
a financial time series object with similar dates to
only one series named
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
HighName: high prices series name
LowName: low prices series name
OpenName: opening prices series
CloseName: closing prices series
Parameter values are the character vectors that represent the valid parameter names.
This example shows how to find the Accumulation/Distribution oscillator for Disney stock and plot the results.
load disney.mat dis_ADOsc = adosc(dis); plot(dis_ADOsc) title('A/D Oscillator for Disney')
Kaufman, P. J. The New Commodity Trading Systems and Methods. John Wiley and Sons, New York, 1987.