PureBytes Links
Trading Reference Links
|
Hi Anthony ,
> Run the two scans separately....to create the composites..
> Does this seem correct ?
Yes, spot on, thanks for your help.
In regards to your other code (below) that doesn't need composites,
would it be possible to add within the code the decliners or would I
need to mofify the code for decliners and run it as separate chart?
BTW it works great!
Cheers Glenn
----------------------8<--------------------
//Function
//% of stocks Advancing
Wlist=Param("WatchListNum",0,0,63,1);
function CreatePercentofStocksAdvancing( 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" ) > Ref(Foreign( sym, "c" ),-1) ;
if( i == 0 ) Advancers = f;
else Advancers = Advancers + f;
}
return (Advancers / i)*100; // divide by number of components
}
Plot( CreatePercentofStocksAdvancing( Wlist ), "% of Stocks
Advancing",colorGreen );
----------------------8<--------------------
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
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/
|