Paint bars

Questions about MultiCharts and user contributed studies.
Gary Wedel
Posts: 6
Joined: 25 Aug 2007

Paint bars

Postby Gary Wedel » 15 Apr 2008

Would like to know how to plot bars based on close above or below 8 period moving average close.

User avatar
TJ
Posts: 6584
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 970 times
Been thanked: 1907 times

Postby TJ » 15 Apr 2008

you need to describe a bit more on what you want to achieve.


p.s. paintbar is not difficult to do. I can help you with some examples if you want.
Last edited by TJ on 18 Apr 2008, edited 1 time in total.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Re: Paint bars

Postby Marina Pashkova » 18 Apr 2008

Would like to know how to plot bars based on close above or below 8 period moving average close.


Hi Gary,

It is not quite clear what exactly you are trying to do. Could you please give us more details?

wullenweber helmut
Posts: 51
Joined: 21 Dec 2007
Has thanked: 1 time
Been thanked: 9 times

Postby wullenweber helmut » 19 Apr 2008

@Gary

Try this:

{Indikator: Paintbar Moving Average}

inputs: Price(Close), Length(8), Displace(0);
variables: avg(0);

avg = Average( Price, Length );

if Displace <= 0 then
begin
if Price >= avg then PlotPaintBar(H,L,O,C, "Price > avg",green )
else begin
if Price < avg then PlotPaintBar(H,L,O,C, "Price < avg",red )
end;
end;
Attachments
MavgPB.png
MavgPB.png (39.28 KiB) Viewed 193 times


Return to “MultiCharts”