BARS CHART in color  [SOLVED]

Questions about MultiCharts and user contributed studies.
chipeur_le_renard
Posts: 50
Joined: 13 Jul 2014
Has thanked: 15 times
Been thanked: 5 times

BARS CHART in color

Postby chipeur_le_renard » 23 Sep 2016

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
Attachments
Univers Bourse.png
(63.88 KiB) Downloaded 990 times

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: BARS CHART in color

Postby bensat » 23 Sep 2016

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);
Settings ....

Scaling
Image

Properties
Image

Style
Image

Kind Regards

Ben

chipeur_le_renard
Posts: 50
Joined: 13 Jul 2014
Has thanked: 15 times
Been thanked: 5 times

Re: BARS CHART in color

Postby chipeur_le_renard » 23 Sep 2016

thx ben

very very cool

kind regards

chipeur_le_renard
Posts: 50
Joined: 13 Jul 2014
Has thanked: 15 times
Been thanked: 5 times

Re: BARS CHART in color  [SOLVED]

Postby chipeur_le_renard » 23 Sep 2016

thx
Attachments
Univers Bourse.png
(14.65 KiB) Downloaded 973 times

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: BARS CHART in color

Postby bensat » 23 Sep 2016

Seems like you set the STYLE of the bars wrong .... here again :

Style
Image

Kind Regards.

Ben

chipeur_le_renard
Posts: 50
Joined: 13 Jul 2014
Has thanked: 15 times
Been thanked: 5 times

Re: BARS CHART in color

Postby chipeur_le_renard » 23 Sep 2016

all run well now

kind regards and have a nice day !!!!!!!!!

chipeur_le_renard
Posts: 50
Joined: 13 Jul 2014
Has thanked: 15 times
Been thanked: 5 times

Re: BARS CHART in color

Postby chipeur_le_renard » 24 Sep 2016

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

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: BARS CHART in color

Postby bensat » 24 Sep 2016

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


Return to “MultiCharts”