I can get to this result:
% Google market data from yahoo
str = urlread('http://ichart.finance.yahoo.com/table.csv?s=GOOG&a=00&b=1&c=2005&d=00&e=1&f=2011&g=m&ignore=.csv');
% Extract dates, high, low, close, open
[dates,o,h,l,c] = dataread('string',str,'%s%f%f%f%f%*f%*f','delimiter',',','headerlines',1);
dates = datenum(dates,'yyyy-mm-dd');
% Plot the candles and the line, reversing the order won't work candle(h,l,c,o,'k',dates,'yy-mmm') hold on plot(dates,mean([h,l],2),'--r','LineWidth',2)
