Price and Volume chart
The syntax for
priceandvol has changed. Previously, when using
table input, the first column of dates could be serial date numbers, date character
vectors, or datetime arrays, and you were required to have specific number of
When using table input, the new syntax for
No need for time information. If you want to pass in date information, use timetable input.
No requirement of specific number of columns. However, you must provide
valid column names.
linebreak must contain columns named
'volume' (case insensitive).
h = priceandvol(Data)
Load the file
SimulatedStock.mat, which provides a timetable (
TMW) for financial data for TMW stock. This price and volume chart for the TMW stock contains the open, high, low, close, and volume for the most recent 21 days.
load SimulatedStock.mat priceandvol(TMW(end-20:end,:));
Data— Data for opening, high, low, closing prices, and volume traded
Data for opening, high, low, closing prices, and volume traded, specified
as a matrix, table, or timetable. For matrix input,
5 matrix of opening, high,
low, closing prices and traded volume. Timetables and tables with
M rows must contain variables named
'Volume' (case insensitive).
h— Graphic handle of the figure
Graphic handle of the figure, returned as a handle object.