function candle(hi,lo,cl,op,color,dates,dateform)
if nargin < 5
cls = get(gca,'colororder');
color = cls(1,:);
end
if nargin < 4
error('finance:candle:missingInputs',sprintf('Missing high, low, closing, or opening data.'))
end
[m,n] = size(hi);
if size(hi, 2) > 1 | size(lo, 2) > 1 | size(cl, 2) > 1 | size(op, 2) > 1,
error('finance:candle:invalidInputs',sprintf('Please specify input data as column vectors.'))
elseif size(hi, 1) ~= size(lo, 1) | size(lo, 1) ~= size(cl, 1) | size(cl, 1) ~= size(op, 1),
error('finance:candle:mismatchInputData','Number of data must be consistent across inputs.');
end
if nargin == 6 | nargin == 7,
if size(dates, 2) ~= 1,
error('finance:candle:invalidDateSize'