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
To: [email protected] 
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

Reply via email to