Trying to plot a candlestick chart. I keep getting an error using Candle Line 41. I am trying to do a candle stick intra day but I can't even do daily. Im not even sure if this is only daily info. Help please!

1 回表示 (過去 30 日間)
clc clear all; % Historic data c=yahoo; d = fetch(yahoo,'IBM','JAN/01/2008','JUN/30/2012') from=datetime('JAN/01/2008'); to=datetime('JUN/30/2012'); % Current data fetch(c,'IBM'); data=fetch(c,'IBM','Close',from,to) whos data close(c);
plot(data(:,2)) candle(data('JAN/01/2008::JUN/30/2012''Highdata')) %This is my code and it returns an error missing high,low, closing,or opening data

採用された回答

Sudarshan Kolar
Sudarshan Kolar 2017 年 4 月 24 日
編集済み: Sudarshan Kolar 2017 年 4 月 24 日
Hi David,
I understand that you are getting some errors when plotting candlestick chart. Please execute the following command and see if you get the same error:
load disney;
candle(dis_HIGH(end-20:end), dis_LOW(end-20:end), dis_CLOSE(end-20:end),...
dis_OPEN(end-20:end), 'b');
If you are not getting any errors with the above code, the issue might be related to the data being passed to the "candle" function. Please check that.
If you are getting some error with the above code, please check the following:
a) You have the financial toolbox installed (you can type "ver" in your command window and see if you have it installed)
b) Try the following command and see if this fixes the issue:
>>restoredefaultpath
>>rehash toolboxcache
>>savepath
Also, please post the exact error message for our better understanding.
Sudarshan
  1 件のコメント
David Holland
David Holland 2017 年 4 月 24 日
I found my problem. It was that I didn't save the data and organize it correctly. Thank you though!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBar Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by