Hi
I have tried to code the problem as under, but it does not give the correct solution:
S1 = Study("S1",GetChart ID());
S2 = Study("S2",GetChart ID());
R1 = Study("R1",GetChart ID());
R2 = Study("R2",GetChart ID());
TrendRibbon = IIf(C> (S1 or S2), colorgreen, IIf(C< (R1 or R2), colorred, colorwhite)) ;
Plot(10,"Ribbon" , TrendRibbon, styleOwnScale| styleArea| styleNoLabel , -0.5, 100 );
Can anybody give the correct code please
perumal
--- In amibroker@xxxxxxxxx ps.com, "umrperumal" <umrperumal@ ...> wrote:
>
>
> Hi,
>
> I have two rising trendline studies marked S1 and S2 (Support line1 and support line2).
>
> I also have two falling trend line studies marked R1 and R2 (Resistance1 and Resistance 2
lines).
>
> I want to paint the ribbon such that price above S1 & S2 paints green color ribbon and the price below R1 & R2 paints red color ribbon.
>
> I am not able to figure out how to do it. Any ideas?
>
> With kind regards
>
> perumal
>