hhigh

Highest high

Syntax

hhv = hhigh(data)
hhv = hhigh(data, nperiods, dim)
hhvts = hhigh(tsobj, nperiods)
hhvts = hhigh(tsobj, nperiods, ParameterName, ParameterValue)

Arguments

data

Data series matrix.

nperiods

(Optional) Number of periods. Default = 14.

dim

(Optional) Dimension.

tsobj

Financial time series object.

ParameterName

The valid parameter name is:

  • HighName: high prices series name

ParameterValue

The parameter value is a string that represents the valid parameter name.

Description

hhv = hhigh(data) generates a vector of highest high values for the past 14 periods from the matrix data.

hhv = hhigh(data, nperiods, dim) generates a vector of highest high values for the past nperiods periods. dim indicates the direction in which the highest high is to be searched. If you input [] for nperiods, the default is 14.

hhvts = hhigh(tsobj, nperiods) generates a vector of highest high values from tsobj, a financial time series object. tsobj must include at least the series High. The output hhvts is a financial time series object with the same dates as tsobj and data series named HighestHigh. If nperiods is specified, hhigh generates a financial time series object of highest high values for the past nperiods periods.

hhvts = hhigh(tsobj, nperiods, ParameterName, ParameterValue) specifies the name for the required data series when it is different from the default name. The valid parameter name isHighName. The parameter value is a string that represents the valid parameter name.

Examples

expand all

Compute the Highest High Price

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

load disney.mat
dis_HHigh = hhigh(dis);
plot(dis_HHigh)
title('Highest High for Disney')

See Also

Was this topic helpful?