PureBytes Links
Trading Reference Links
|
//Composite ADV /DECL
Advv = IIf(C>Ref(C,-1),V,0);//Advancing Volume
Decv = IIf(C<Ref(C,-1),V,0);//Declining Volume
AdvIssue = IIf(C>Ref(C,-1),1,0);//Advancing Issues
DecIssue= IIf(C<Ref(C,-1),1,0);
AddToComposite( Advv, "~AdvVol", "x",1);
AddToComposite( DecV, "~DecVol", "x",1);
AddToComposite( AdvIssue, "~AdvIssue", "x");
AddToComposite( DecIssue, "~DecIssue", "x");
Anthony
----- Original Message -----
From: <RazzBarry1@xxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, December 16, 2003 6:15 PM
Subject: [amibroker] how do you use addtocomposite?
> First, is there a symbol in the AmiQuote data sources that will give
> the advance and decline values of the NYSE on a daily and historical
> basis? If so I would not have to search the AmiBroker database.
>
> I am trying to scan the NYES in AB to find the number of advancing
> and declining issues. I tried to use the following but I get an
> empty composite. What am I doing wrong?
>
> Dec = DecIssues();
> AddToComposite(Dec, "~CumAD", "L");
> Adv = AdvIssues();
> AddToComposite(Adv, "~CumAD", "H");
> delta = Adv - Dec;
> AddToComposite(delta, "~CumAD", "C");
> Buy = 0; // required by scan mode
>
> After I run this I look at "~CumAD and nothing is present but the
> ticker and date. All other fields have 0. I use a filter Market =
> NYSE and all other fields blank. I also added Group = Stocks, but
> neither filled the ~CumAD fields.
>
> Since the AddIssues and DecIssues returns an array do I need to use
> a loop to go through the arrays and add the fields to ~CumAD? If so
> what would the loop look like? For loops need to know how many
> entries are in an array. I do not know how to determine the number
> of entries in the arrays returned. In C++ I would use GetSize but I
> do not see that in AFL. Does BarCount serve the same function? Does
> BarCount care whether you a subset of the database, set the scan to
> search only specific date ranges?
>
> Once I build the ~cumAD say from 1970, how would I add entries
> daily, just change the date range to one day and scan?
>
> Thanks,
> Barry
>
>
> 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 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/
>
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.552 / Virus Database: 344 - Release Date: 12/15/2003
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 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/
|