Draw candlestick chart by reading the data in excel file.

1 view (last 30 days)
I need some help, i downloaded some data in excel format. Any idea to draw a candlestick chart by reading the excel file?
Attached file is the example of excel data file. First to the following column of the excel file represent (Date,Time,Open,High,Low,Close,Volume).
Any idea using this information and data to draw a candlestick chart?

Accepted Answer

Stephan
Stephan on 1 Feb 2019
Hi,
you can use the following code:
Data = readtable('DAT_MT_EURAUD_M1_2018.csv');
Data = mergevars(Data,[1 2]);
Data.Var1 = join(Data{:,1});
Data.Var1 = datetime(Data.Var1,'InputFormat','yyyy.MM.dd HH:mm');
Data.Properties.VariableNames = {'Date_Time', 'Open', 'High', 'Low',...
'Close', 'Volume'};
Data = table2timetable(Data);
candle(Data)
It takes a little moment to execute, since this is a pretty big dataset. But it is working.
Best regards
Stephan
  17 Comments
Stephan
Stephan on 17 Feb 2019
i would suggest that you ask yourself how useful a 1-Minute Resolution may be for such a big time span.
Tai Wai ming
Tai Wai ming on 17 Feb 2019
Okay, Thanks for the help stephan i will consider about it. Thank you so much

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!