Financial Time Series Toolbox | ![]() ![]() |
Accumulation/Distribution oscillator
Syntax
ado = adosc(highp, lowp, openp, closep) ado = adosc([highp lowp openp closep]) adots = adosc(tsobj) adots = adosc(tsojb, ParameterName, ParameterValue, ...)
Arguments
highp |
High price (vector) |
lowp |
Low price (vector) |
openp |
Opening price (vector) |
|
Closing price (vector) |
tsobj |
Time series object |
Description
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 represents the valid parameter names.
Examples
Compute the Accumulation/Distribution oscillator for Disney stock and plot the results:
See Also
![]() | adline | ascii2fts | ![]() |