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

Re: [amibroker] Percentage Advancers?



PureBytes Links

Trading Reference Links

Hi Ed,

Thanks for the quick reply!!

Just one thing, I think this should be like this:

perc_Adv = Foreign("~Adv", "C") / ( Foreign("~Adv", "C") + Foreign
> ("~Dcl", "C") ) * 100;

...with a "plus" for adding the total stocks. Another thing would be 
to add stocks that don't change to the total stocks ie: C=Ref(C,-1)

Thanks for your help.
Cheers Glenn


--- In amibroker@xxxxxxxxxxxxxxx, "ed2000nl" <pablito@xxxx> wrote:
> this is a little more complete and can be run in a single scan. 
Also 
> this code can be put in the Indicator Builder to visualize:
> 
> Buy = 0;
> 
> Adv=C>Ref(C,-1);
> AddToComposite(Adv,"~Adv","C");
> Dcl=C<=Ref(C,-1);
> AddToComposite(Dcl,"~Dcl","C");
> 
> perc_Adv = Foreign("~Adv", "C") / ( Foreign("~Adv", "C") / Foreign
> ("~Dcl", "C") ) * 100;
> 
> Plot(perc_Adv,"blabla",1,1);
> 
> 
> rgds, Ed
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Glenn" <glennokb@xxxx> wrote:
> > Hi,
> > 
> > I'd like to setup a composite of the % advancers (& decliners 
> > later)  ...any idea how please? ie:
> > 
> > % advancers = advancers / total (active) stocks x 100
> > 
> > For starters:
> > 
> > Adv=C>Ref(C,-1);
> > AddToComposite(Adv,"~Adv","C");
> > 
> > I need to add to the above the total stocks. Is there a way to 
> count 
> > them, would you need to run another scan first to get the total 
> stock or 
> > could it be done within one scan?
> > 
> > Cheers Glenn


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/