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

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



PureBytes Links

Trading Reference Links

Hi

I have tried to code the problem as under, but it does not give the correct solution:

S1 = Study("S1",GetChartID());
S2 = Study("S2",GetChartID());
R1 = Study("R1",GetChartID());
R2 = Study("R2",GetChartID());

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@xxxxxxxxxxxxxxx, "umrperumal" <umrperumal@xxx> 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/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/