Looking for candlestick, rsi, csv file example
6 views (last 30 days)
Show older comments
Normally for python and other languages, if i search such keywords candlestick+rsi+csv, i can find plenty of examples.
Now i'm learning matlab, cannot find proper samples yet, so want to start with dummy questions, pls bear with me.
i got this:
Data = readtable('/home/usr1/matlab/spy.csv')
now i want to draw the candlestick and rsi in the same figure, can someone show me a simple code to get started ?
My question is, i don't know the latest correct ways, some examples are from 2011 and won't compile in the latest matlab version.
Thanks !
0 Comments
Accepted Answer
Stephan
on 18 Feb 2019
Edited: Stephan
on 18 Feb 2019
Hi,
here is a working example for candlestick containing .csv-data which works on R2018b:
Best regards
Stephan
5 Comments
Stephan
on 18 Feb 2019
Edited: Stephan
on 18 Feb 2019
The warning appears since there is a space in Adj Close, which is an unallowed variable name. I used the HeaderLines',1 which fixes the problem and gave the variable names by hand:
Data = readtable('qqq.csv','HeaderLines',1);
Data.Properties.VariableNames = {'Date_Time', 'Open', 'High', 'Low',...
'Close', 'Adj_Close', 'Volume'};
Data = table2timetable(Data);
candle(Data)
I think this is a pretty nice short code to get a candlestick chart...
More Answers (0)
See Also
Categories
Find more on Financial Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!