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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Bar Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by