Indicator help (IF... THEN... ELSE)
Posted: 25 Nov 2006
Hi All
the below plotsOK,but some bars are not colored because they do not fall within the criteria...C > C[1]and C > C[2] and C > C[3]
I refer to these unpainted bars as "Warning Bars"
Could someone show me how to color these "Warning Bars" yellow
Thanks
Milton
the below plotsOK,but some bars are not colored because they do not fall within the criteria...C > C[1]and C > C[2] and C > C[3]
I refer to these unpainted bars as "Warning Bars"
Could someone show me how to color these "Warning Bars" yellow
Thanks
Milton
Code: Select all
If C > C[1]and C > C[2] and C > C[3] then begin
Condition1 = True ;
end else begin
Condition1 = False;
end;
If C < C[1]and C < C[2] and C < C[3] then begin
Condition2 = True ;
end else begin
Condition2 = False;
end;
Value1 = HIGH[0] ;
Value2 = LOW[0] ;
if Condition1 then
begin
PlotPaintBar[0]( Value1, Value2, "Plot", Cyan ) ;
Alert( "Close > than 3 prev Closes" ) ;
end
else if Condition2 then
begin
PlotPaintBar[0]( Value1, Value2, "Plot", Red ) ;
Alert("Close < than 3 prev Closes" ) ;
end ;