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
0 件のコメント
採用された回答
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
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Bar Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!