Main Content

highlow (fts)

Time series High-Low plot

highlow (fts) is not recommended. Use highlow instead.

Description

example

highlow(tsobj) generates a High-Low plot of the data in the financial time series object tsobj. tsobj must contain at least four data series representing the high, low, open, and closing prices. These series must have the names High, Low, Open, and Close (case-insensitive).

example

highlow(tsobj,color) additionally specifies the color of the plot.

example

highlow(tsobj,color,dateform) additionally specifies the date format used as the x-axis tick labels. See datestr for a list of date formats.

example

highlow(___,Name,Value) indicates the actual names of the required data series if the data series do not have the default names.

example

hhll = highlow(___,Name,Value) returns the handle to the line object that makes up the High-Low plot.

Examples

collapse all

This example shows how to generate a High-Low plot for Disney stock for the dates May 28 to June 18, 1998.

load disney.mat
Warning: FINTS is not recommended. Use TIMETABLE instead. For more information, see <a href="matlab:web(fullfile(docroot, 'finance/convert-from-fints-to-timetables.html'))">Convert Financial Time Series Objects (fints) to Timetables</a>.
highlow(dis('28-May-1998::18-Jun-1998'))
Warning: FINTS is not recommended. Use TIMETABLE instead. For more information, see <a href="matlab:web(fullfile(docroot, 'finance/convert-from-fints-to-timetables.html'))">Convert Financial Time Series Objects (fints) to Timetables</a>.
title('High-Low Plot for Disney')

Figure contains an axes object. The axes object with title High-Low Plot for Disney contains an object of type line.

Input Arguments

collapse all

Financial time series object, specified as a fints object.

Data Types: object

(Optional) A three-element row vector representing RGB color vector or a character vector specifying the color name. The default color differs depending on the background color of the figure window. For more information, see plot.

Data Types: double | char

(Optional) Date format used as the x-axis tick labels, specified as a date character vector format. (For more information, see datetick.) You can specify a dateform only when tsobj does not contain time-of-day data. If tsobj contains time-of-day data, dateform is restricted to 'dd-mmm-yyyy HH:MM'.

Data Types: char

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: highlow(dis('28-May-1998::18-Jun-1998'),'HighName','SeriesHigh')

High name, specified as the comma-separated pair consisting of 'HighName' and a character vector with a value for the high prices series name.

Data Types: char

Low name, specified as the comma-separated pair consisting of 'LowName' and a character vector with a value for the low prices series name.

Data Types: char

Open name, specified as the comma-separated pair consisting of 'OpenName' and a character vector with a value for the open prices series name.

Data Types: char

Close name, specified as the comma-separated pair consisting of 'CloseName' and a character vector with a value for the closing prices series name.

Data Types: char

Output Arguments

collapse all

High-Low plot handle, returned as the handle to the line object that makes up the High-Low plot.

Version History

Introduced before R2006a

See Also