Candlestick question

3 views (last 30 days)
Mate 2u
Mate 2u on 10 Feb 2011
I want to draw a candlestick graph for the entries of my 1x360214 array.
candle(HighPrices, LowPrices, ClosePrices, OpenPrices)
This is predetermined in MATLAB.
For this I need to split this array into sections of like 4000 where for each 4000 I find end entry, start entry, max entry and min entry.
  3 Comments
Mate 2u
Mate 2u on 10 Feb 2011
They are all numbers some have decimal places. But are all positive
Vieniava
Vieniava on 10 Feb 2011
so, which of them are HighPrice,LowPrice,ClosePrice,OpenPrice?

Sign in to comment.

Accepted Answer

Vieniava
Vieniava on 10 Feb 2011
If V is your 1x360214 data vector:
seg=4000;
segments=floor(length(V)/seg);
V=V(1: (segments*seg) );
AlgoMatrix=reshape(V, seg, []);
OpenPrices=AlgoMatrix(1,:);
ClosePrices=AlgoMatrix(seg,:);
MinPrices=min(AlgoMatrix);
MaxPrices=max(AlgoMatrix);
  2 Comments
Mate 2u
Mate 2u on 10 Feb 2011
??? Error using ==> candle at 47
Please specify input data as column vectors.
This is the error I am receiving
Ned Gulley
Ned Gulley on 10 Feb 2011
Mate2u said: "Thanks solved it just transposed."

Sign in to comment.

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!