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

Re: [amibroker] need help to plot a band under the price chart


  • Date: Sat, 2 Jan 2010 17:57:30 +0500
  • From: "Mubashar Virk" <mvirk67@xxxxxxxxx>
  • Subject: Re: [amibroker] need help to plot a band under the price chart

PureBytes Links

Trading Reference Links



You may like to work with this.
 

_SECTION_BEGIN("Trend Bars");

smap = Param("SMA Length", 9,5,20,1);

WMAp = Param("WMA Length", 45,9,75,1);

rpds = Param("RSI Length", 14,3,50,1);

/*

smap = Optimize("SMA Length", 9,5,20,1);

WMAp = Optimize("WMA Length", 45,9,75,1);

rpds = Optimize("RSI Length", 14,3,50,1);

*/

p1 = MA( C, smap); //9-period on price (MA)

p2 = WMA( C, WMAp); //45-period on price (WMA)

r1 = MA( RSI(rpds), smap); //9-period on RSI (MA)

r2 = WMA( RSI(rpds), WMAp); //45-Period on RSI (WMA)

up = p1 > p2 AND r1 > r2; //trend is up

dn = p1 < p2 AND r1 < r2; //trend is down

sup = p1 > p2 AND r1 < r2; //trend is sideways to up

sdn = p1 < p2 AND r1 > r2; //trend is sideways to down

Plot( 1, "", IIf(up, colorDarkGreen, IIf(dn, colorDarkRed, IIf(sup, colorLightBlue, IIf(sdn, colorOrange, 0)))), styleOwnScale|styleArea|styleNoLabel, -0.1, 50 );

_SECTION_END();

 


From: Ashis
Sent: Saturday, January 02, 2010 5:50 PM
Subject: [amibroker] need help to plot a band under the price chart

 

hello there ,

I would like to plot a narrow band at the bottom of the price chart with the color according to a trading signal, for example if the MA1 is above MA2 it will be colored green , else it will be colored red.

how can i do that ?..can anyone help me please ?

i shall be obliged if you kindly solve the problem for me.

thanks in advance

ashis



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4737 (20100102) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4737 (20100102) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


__._,_.___


**** 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

__,_._,___