plot indicator using setplotclour  [SOLVED]

Questions about MultiCharts and user contributed studies.

plot indicator using setplotclour

Postby jzolty » 12 Oct 2006

I have an indicator that I would like to plot red colour if it is above price highs and blue colour if it is below price lows.

any help is welcomed.

inputs: Lowperiods(7),highperiods(7),displaced(5);

Value1= Lowest(low,Lowperiods)[displaced];
Value2= highest(high,highperiods)[displaced];
value3= IfF(value1<value1[1], Value2,value1);
value4= iff( value2>value2[1],value1,value2);
value5= ifF (value3<value3[1], value4,
iff (value4>value4[1],value3,value3));



User avatar
Alex Kramer
Posts: 834
Joined: 23 Feb 2006


Postby Alex Kramer » 13 Oct 2006

Here's what we think can suit your needs - we were basing the indicatir on your rayther brief description:

inputs : price(c), lowperiods(7), highperiods(7), offset(1) ;
if price crosses above highest(high,highperiods)[offset] then setplotcolor(1,red);
if price crosses below lowest(low,lowperiods)[offset] then setplotcolor(1,blue);

Return to “MultiCharts”