hi
does anyone have code to paint bar chart like on screenshot ???
at right>>>> bar chart from MC
at left>>>>> bars chart from ATAS
i need ATAS format in MC
thx for help
regards
BARS CHART in color [SOLVED]
-
- Posts: 50
- Joined: 13 Jul 2014
- Has thanked: 15 times
- Been thanked: 5 times
Re: BARS CHART in color
Code: Select all
input: upcolor(green), dncolor(red), normcolor(yellow), plotwidth(3);
var: color(0);
if close > open then color = upcolor else
if close = open then color = normcolor else
if close < open then color = dncolor;
plot1 (open, "O", color);
plot2 (high, "h", color);
plot3 (low, "l", color);
plot4 (close, "c", color);
setplotwidth(1, plotwidth);
setplotwidth(2, plotwidth);
setplotwidth(3, plotwidth);
setplotwidth(4, plotwidth);
Scaling
Properties
Style
Kind Regards
Ben
-
- Posts: 50
- Joined: 13 Jul 2014
- Has thanked: 15 times
- Been thanked: 5 times
-
- Posts: 50
- Joined: 13 Jul 2014
- Has thanked: 15 times
- Been thanked: 5 times
Re: BARS CHART in color [SOLVED]
thx
- Attachments
-
- Univers Bourse.png
- (14.65 KiB) Downloaded 973 times
-
- Posts: 50
- Joined: 13 Jul 2014
- Has thanked: 15 times
- Been thanked: 5 times
-
- Posts: 50
- Joined: 13 Jul 2014
- Has thanked: 15 times
- Been thanked: 5 times
Re: BARS CHART in color
Code: Select all
vars: drawcolor(DarkGray);
drawcolor=iff(open<close,Green,Red);
if open=close then drawcolor=DarkGray;
PlotPaintBar(High,Low,Open,Close,"",drawcolor);
thx ben for help
see this one
the iff fonction is very nice
kind regards
Re: BARS CHART in color
Thank you and this code is in common use, yes. I just thought you seemed not very familiar with PowerLanguage in MC at all, so I believed to suggest something simple/basic to start with is a good way to get comfortable to learn programming in MC & PowerLanguage.
Nice to read that you already like the 'IFF' function.
Kind Regards
Ben
Nice to read that you already like the 'IFF' function.
Kind Regards
Ben