PureBytes Links
Trading Reference Links
|
John,
I have not tried the code below but it might work. I am guessing however
due to the averaging in each pass it might be more sensitive thus may
have more gaps.
sym = "^" + SectorID(1);
Count=AddToComposite( 1, sym+"count", "I"); //Careful names will
truncate if too long
AddToComposite(O/Foreign("^"+SectorID(1)+"count","I"), sym, "O");
AddToComposite(H/Foreign("^"+SectorID(1)+"count","I"), sym, "H");
AddToComposite(L/Foreign("^"+SectorID(1)+"count","I"), sym, "L");
AddToComposite(C/Foreign("^"+SectorID(1)+"count","I"), sym, "C");
AddToComposite(V/Foreign("^"+SectorID(1)+"count","I"), sym, "V");
CategoryAddSymbol(sym,categoryWatchlist,55);//add symbols to watchlist
Buy=Sell=Short=Cover=0;
Filter=1;
Regards,
Duke Jones, CMT
trader@xxxxxxxxxxxxxxx wrote:
> All,
>
> Currently, I'm using AddToComposite to create synthetic tickers for Industry
> Groups and Sectors. The overall algorithm is to sum the OHLC values for each
> security and then divide this number by the count of the number of
> securities in each industry group. Straightforward, but difficult to do with
> AddToComposite because the count for each of the industry groups won't be
> known until AFTER the completion of the compositing Scan.
>
> That means dividing the algorithm into two Scans: creation of the Industry
> Group security counts and creation of each Industry Group composite. At a
> minimum, this requires two scans and twice as many composite symbols as
> there are Industry Groups!
>
> So my question becomes, is there a way to somehow persist counts for each of
> the industry groups without using lots and lots of synthetic symbols?
> Alternately, is there a way to organize these symbols in another group
> (default is 253) or delete them programmatically? Creating temporary symbols
> between scans for calculations would make the above solution more tolerable
> since I could remove the counts when done with them.
>
> Thanks for the help!
>
> -- John
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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/
|