Budget: 10-15euros all-in
Goal of this micro project is generate code or adjust the Matlab 'candle.m' function in order to generate a candlestick plot with:
1) green color when close>open price
2) red color when close<open price
3) WITH the corresponding colors for the shadows (this is the difficulty I'm facing), i.e. green color under condition (1) and red color under condition (2) (i.e. not a fixed and single color which could be defined by the 'Color' input)
Examples:
load [login to view URL];
candle(TMW(end-20:end,:),'b');
(1) and (2) can already be fixed with:
ch = get(gca,'children');
set(ch(1),'FaceColor','r'); set(ch(2),'FaceColor','g'); set(ch(1),'EdgeColor','none'); set(ch(2),'EdgeColor','none');
(3) can not, a priori, be fixed by using something like this
clrs=char('r','g'); % the two-vector from which to choose (red, green)
Color=clrs((ClosePrices>=OpenPrices)+1); % select based on condition
candle(HighPrices,LowPrices,ClosePrices,OpenPrices,Color)
Please let me know if you're interested in this micro project and whether this is possible in Matlab, maybe via an extra gca argument or using plotvec within the candle.m function.
I've been using Matlab for my college projects for the past 2 years.
I have my fair share of knowledge in this software. given the data, I feel it's easy to code it to change color based on the given arguments.