candle function problem

조회 수: 1 (최근 30일)
Liang
Liang 2011년 7월 21일
I find that candle function works well when the number of data is small, but once it is above 600, the function does not generate a proper candlestick chart. Anyone knows how to solve the problem?

답변 (2개)

Sean de Wolski
Sean de Wolski 2011년 7월 21일
Do you really expect to be able to visualize on a small scale 600 different points?
It seems like a lot to me and would not be visible on any regular sized piece of paper/ computer monitor etc.
  댓글 수: 1
Liang
Liang 2011년 7월 21일
I expect to use zoom to look closely and move forward

댓글을 달려면 로그인하십시오.


Oleg Komarov
Oleg Komarov 2011년 7월 21일
str = urlread('http://ichart.finance.yahoo.com/table.csv?s=GOOG&d=6&e=21&f=2011&g=d&a=7&b=19&c=2004&ignore=.csv');
[O,H,L,C] = dataread('string',str,'%*s%f%f%f%*f%*f%f','headerlines',1,'delimiter',',');
candle(H,L,C,O)
EDIT
with dates:
str = urlread('http://ichart.finance.yahoo.com/table.csv?s=GOOG&d=6&e=21&f=2011&g=d&a=7&b=19&c=2004&ignore=.csv');
[time,O,H,L,C] = dataread('string',str,'%s%f%f%f%*f%*f%f','headerlines',1,'delimiter',',');
candle(H,L,C,O,[],datenum(time,'yyyy-mm-dd'),'dd mmm yy')
Just zoom in.
  댓글 수: 1
Liang
Liang 2011년 7월 21일
Thanks for the code. Would it also work if I want to do a time series candlestick? (with time variable on the horizontal axis)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Bar Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by