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

Re: [amibroker] Re: Indicator help...



PureBytes Links

Trading Reference Links

Brusier,

 

//% of stocks above 30dMA

Wlist=Param("WatchListNum",0,0,63,1);

function CreatePercentofStocksAdvancing30( listnum )

{

// retrive comma-separated list of symbols in watch list

list = GetCategorySymbols( categoryWatchlist, listnum );

Advancers = 0; // just in case there are no watch list members

for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )

{

f = Foreign( sym, "c" ) > MA(Foreign( sym, "c" ),30) ;

if( i == 0 ) Advancers = f;

else Advancers = Advancers + f;

}

return (Advancers / i)*100; // divide by number of components

}

 

Plot( CreatePercentofStocksAdvancing30( Wlist ), "\n"+"% of Stocks Above 30dMA",colorBrightGreen,styleLine );

 

 

----- Original Message -----
From: bruiserbbq
Sent: Tuesday, February 01, 2005 7:17 PM
Subject: [amibroker] Re: Indicator help...


Thanks Ken, but can you post the whole code as it looks like in the
newsletter? I have cut and paste...but I'm getting errors...sheesh I'm
hopeless at code!

Cheers Bruiser





Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.1 - Release Date: 1/27/2005


Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html




Yahoo! Groups Links

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.1 - Release Date: 1/27/2005