Financial Time Series Toolbox | ![]() ![]() |
Syntax
tprc = typprice(highp, lowp, closep) tprc = typprice([highp lowp closep]) tprcts = typprice(tsobj) tprcts = typprice(tsobj, ParameterName, ParameterValue, ...)
Arguments
highp |
High price (vector) |
lowp |
Low price (vector) |
|
Closing price (vector) |
tsobj |
Financial time series object |
Description
tprc = typprice(highp, lowp, closep)
calculates the typical prices tprc
from the high (highp
), low (lowp
), and closing (closep
) prices. The typical price is the average of the high, low, and closing prices for each period.
tprc = typprice([highp lowp closep])
accepts a three-column matrix as the input rather than two individual vectors. The columns of the matrix represent the high, low, and closing prices, in that order.
tprcts = typprice(tsobj)
calculates the typical prices from the stock data contained in the financial time series object tsobj
. The object must contain, at least, the High
, Low
, and Close
data series. The typical price is the average of the closing price plus the high and low prices. tprcts
is a financial time series object of the same dates as tsobj
containing the data series TypPrice
.
tprcts = typprice(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
CloseName
: closing prices series name
Parameter values are the strings that represent the valid parameter names.
Examples
Compute the typical price for Disney stock and plot the results:
See Also
Reference
Achelis, Steven B., Technical Analysis from A To Z, Second printing, McGraw-Hill, 1995, pp. 291 - 292.
![]() | tsmovavg | uminus | ![]() |