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 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
David Holland
il 22 Apr 2017
Commentato: David Holland
il 24 Apr 2017
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 Commenti
Risposta accettata
Sudarshan Kolar
il 24 Apr 2017
Modificato: Sudarshan Kolar
il 24 Apr 2017
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
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Bar Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!