Weighted close
collapse all in page
Syntax
WeightedClose = wclose(Data)
Description
WeightedClose = wclose(Data)
calculates the weighted closing prices from the series of high, low, and closing prices. The weighted closing price is the average of twice the closing price plus the high and low prices.
Examples
collapse all
Calculate the Weighted Closing Prices for a Data Series for a Stock
Open Live Script
Load the file SimulatedStock.mat
, which provides a timetable (TMW
) for financial data for TMW stock.
load SimulatedStock.matWeightedClose = wclose(TMW);plot(WeightedClose.Time,WeightedClose.WeightedClose)title('Weighted Closing Prices for TMW')
Input Arguments
collapse all
Data
— Data for high, low, and closing prices
matrix | table | timetable
Data for high, low, and closing prices, specified as a matrix, table, or timetable. For matrix input, Data
is an M
-by-3
matrix of high, low, and closing prices stored in the corresponding columns. Timetables and tables with M
rows must contain variables named 'High'
, 'Low'
, and 'Close'
(case insensitive).
Data Types: double
| table
| timetable
Output Arguments
collapse all
WeightedClose
— Weighted closing price series
matrix | table | timetable
Weighted closing price series, returned with the same number of rows (M
) and the same type (matrix, table, or timetable) as the input Data.
References
[1] Achelis, S. B. Technical Analysis from A to Z. Second Edition. McGraw-Hill, 1995, pp. 312–313.
Version History
Introduced before R2006a
expand all
R2023a: fints
support removed for Data
input argument
fints
object support for the Data
input argument is removed.
R2022b: Support for negative price data
The Data
input accepts negative prices.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Contact your local office