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

RE: [amibroker] Background color



PureBytes Links

Trading Reference Links

Chris,

Is there a way to add your code to an existing chart so that it appears BEHIND original chart. I have commented out the plot of C, so I only get the background color bars and the MA, but when I drag it into an existing chart it sits on top, and my original chart is not visible.  This would be very useful to me if I can solve this problem.

 

Thanks,

Don Lindberg

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of ChrisB
Sent: Monday, June 11, 2007 6:36 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Background color

 

George

Here is one way you could try...

// background vis a vis MA(c,200);

p = Param("period", 200, 10, 200, 10);
Cond1 = Close > MA(C,p);
Cond2 = Close < MA(C,p);

Plot(C,"", colorWhite, 64);
Plot( MA(C,p),"", IIf(Cond1, colorBlue,IIf(Cond2,colorRed,colorBlack)),1);
Cond1 = Close > MA(C,p);
Cond2 = Close < MA(C,p);

Plot(Param("Height",100,1,100,1),"",IIf(Cond1,
colorRed,IIf(Cond2,colorBlue,colorBlack)
),styleArea|styleOwnScale|styleNoTitle|styleNoLabel|styleNoRescale,0,100);

Plot( MA(C,p),"", colorRed,1);
SetChartBkColor(colorBlack);
SetChartOptions(1,0,1);

Use the Param function to adjust the period.
Use the Height Param to adjust from full height to ribbon.
Change the colors to suit.

ChrisB

george_siris wrote:
>
>
> Hi all,
>
> Is it possible to do the following ?
>
> if condition A then color of chart's background is Red
> if condition B then color of chart's background is Blue
>
> thanks
>
> _

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

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

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

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

__,_._,___