| Financial Time Series Toolbox | |
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) |
|
Closing price (vector) |
nperiods |
Number of periods (scalar). Default = 14. |
tsobj |
Financial time series object |
Description
wpctr = willpctr(highp, lowp, closep, nperiods)
calculates the William's %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 William's %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 William's %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 William's %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
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 Williams %R values 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. 316 - 317.
![]() | willad |