Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

typprice

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).

closep

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 character vectors that represent the valid parameter names.

Examples

collapse all

This example shows how to compute the typical price for Disney stock and plot the results.

load disney.mat
dis_Typ = typprice(dis);  
plot(dis_Typ)
title('Typical Price for Disney')

References

Achelis, Steven B. Technical Analysis from A to Z. Second Edition. McGraw-Hill, 1995, pp. 291–292.

Introduced before R2006a

Was this topic helpful?