MATLAB: Draw candlestick chart by reading the data in excel file.

candlestick chartFinancial Toolbox

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?

Best Answer

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