[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: How to Paint ribbon color based on trendline studies



PureBytes Links

Trading Reference Links



Hi
 
It's likely the way S1 is or'ed with S2 is causing problem
 
try using like this:  C > S1 or C > S2
Rds
SW

From: umrperumal <umrperumal@xxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Saturday, April 11, 2009 12:30:37 AM
Subject: [amibroker] Re: How to Paint ribbon color based on trendline studies


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
>




__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___