highlow

High, low, open, close chart

Syntax

highlow(High, Low, Close, Open, Color)
highlow(High, Low, Close, Open, Color, Dates, Dateform)
Handles = highlow(High, Low, Close, Open, Color, Dates, Dateform)

Arguments

High

High prices for a security. A column vector.

Low

Low prices for a security. A column vector.

Close

Closing prices for a security. A column vector.

Open

(Optional) Opening prices for a security. A column vector. To specify Color when Open is unknown, enter Open as an empty matrix [].

Color

(Optional) Vertical line color. A string. MATLAB® software supplies a default color if none is specified. The default color differs depending on the background color of the figure window. See ColorSpec in the MATLAB documentation for color names.

Dates

(Optional) User-defined dates. A column vector.

Dateform

(Optional) Format of the date string as tick labels. For more information on date string formats, see dateaxis.

Description

highlow(High, Low, Close, Open, Color) plots the high, low, opening, and closing prices of an asset. Plots are vertical lines whose top is the high, bottom is the low, open is a short horizontal tick to the left, and close is a short horizontal tick to the right.

highlow(High, Low, Close, Open, Color, Dates, Dateform) plots the high, low, opening, and closing prices of an asset. Plots are vertical lines whose top is the high, bottom is the low, open is a short horizontal tick to the left, and close is a short horizontal tick to the right. The plot also contains user-defined dates and date string format for tick labels.

Handles = highlow(High, Low, Close, Open, Color, Dates, Dateform) plots the figure and returns the handles of the lines.

Examples

expand all

Create a HighLow Chart

The high, low, open, and closing prices for the equity DIS are stored in equal-length vectors dis_HIGH, dis_LOW, dis_OPEN, and dis_CLOSE respectively and highlow plots the price data using blue lines.

load disney.mat
range = 1:25;
highlow(dis_HIGH(range), dis_LOW(range), dis_CLOSE(range),...
    dis_OPEN(range),'blue',dis.dates(range));

Was this topic helpful?