Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

kagi

Syntax

kagi(X)

Arguments

X

X is a M-by-2 matrix or a table. If X is a M-by-2 matrix, the first column contains date numbers and the second column is the asset price. If X is a table, the first column of the table contains the dates. The second column contains the asset price data. Dates can be a serial date number, a date character vector, or a datetime array.

Description

kagi(X) plots asset price with respect to dates.

Examples

collapse all

This example shows how to generate a Kagi chart for asset X that is an M-by-2 matrix of date numbers and asset prices.

X = [...

733299.00         41.99;...
733300.00         42.14;...
733303.00         41.93;...
733304.00         41.98];

kagi(X)

This example shows how to use datetime input to generate a Kagi chart for asset X that is an M-by-2 matrix of date numbers and asset prices.

X = [...

733299.00         41.99;...
733300.00         42.14;...
733303.00         41.93;...
733304.00         41.98;...
733305.00         41.80;...
733306.00         42.30;...
733307.00         42.00;...
733308.00         42.40;...
733309.00         41.80;...
733310.00         41.90];

dates = datetime(X(:,1),'ConvertFrom','datenum','Locale','en_US');
data=X(:,2);
t=table(dates,data);
kagi(t);

Related Examples

Introduced in R2008a

Was this topic helpful?