willpctr - Williams %R

Syntax

wpctr = willpctr(highp, lowp, closep, nperiods)
wpctr = willpctr([highp, lowp, closep], nperiods)
wpctrts = willpctr(tsobj)
wpctrts = willpctr(tsobj, nperiods)
wpctrts = willpctr(tsobj, nperiods, ParameterName, ParameterValue, 
... )

Arguments

highp

High price (vector)

lowp

Low price (vector)

closep

Closing price (vector)

nperiods

Number of periods (scalar). Default = 14.

tsobj

Financial time series object

Description

wpctr = willpctr(highp, lowp, closep, nperiods) calculates the Williams %R values for the given set of stock prices for a specified number of periods nperiods. The stock prices needed are the high (highp), low (lowp), and closing (closep) prices. wpctr is a vector that represents the Williams %R values from the stock data.

wpctr = willpctr([highp, lowp, closep], nperiods) accepts the price input as a three-column matrix representing the high, low, and closing prices, in that order.

wpctrts = willpctr(tsobj) calculates the Williams %R values for the financial time series object tsobj. The object must contain at least three data series named High (high prices), Low (low prices), and Close (closing prices). wpctrts is a financial time series object with the same dates as tsobj and a single data series named WillPctR.

wpctrts = willpctr(tsobj, nperiods) calculates the Williams %R values for the financial time series object tsobj for nperiods periods.

wpctrts = willpctr(tsobj, nperiods, 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

Parameter values are the strings that represent the valid parameter names.

Examples

Compute the Williams %R values for Disney stock and plot the results:

load disney.mat
dis_Wpctr = willpctr(dis)
plot(dis_Wpctr)
title('Williams %R for Disney')

References

Achelis, Steven B., Technical Analysis from A to Z, Second printing, McGraw-Hill, 1995, pp. 316 - 317.

See Also

stochosc, willad

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS