Thanks Bruce. If I scan only on the current symbol, It would only add that on symbol (although the trace statement shows all symbols were added). The reason I had the following two conditions is that all my composite tickers have one "~" as the first character in their symbol. I also want to exclude all equity tickers that have "~~~" as the first three characters in their symbols. TIA
if ((StrLeft(Name(),1)=="~") AND (StrLeft(Name(),2)!="~~")) From: [email protected] [mailto:[email protected]] On Behalf Of Bruce Sent: Wednesday, September 30, 2009 10:34 AM To: [email protected] Subject: [amibroker] Re: Add addtocompiste generated ticker to a watchlist Close. See changes and run the following as a SCAN on the CURRENT SYMBOL only - TickerList = CategoryGetSymbols( categoryGroup, 253); for( i=0; (Ticker=StrExtract( TickerList, i)) != ""; i++) { if (StrLeft(ticker, 2)=="~~") { CategoryAddSymbol(ticker, categoryWatchlist, 61); _TRACE( "Added - " + ticker ); } } Buy=0; -- BruceR --- In [email protected] <mailto:amibroker%40yahoogroups.com> , "ta" <tagro...@...> wrote: > > Since, I did not hear from anybody I assume that there is not a way. As a > result I wrote the following code to read the addtocomposite created tickers > from group 253 and add them to watchlist 61. However, it takes about 19 > minutes to do this. Does anybody see a way to improve the speed of my code? > Perhaps Tomasz can comment on why this process is so slow? TIA > > > > TickerList = CategoryGetSymbols( categoryGroup, 253); > for( i=0; (Ticker=StrExtract( TickerList, i)) != ""; i++) > { > if ((StrLeft(Name(),1)=="~") AND (StrLeft(Name(),2)!="~~")) > CategoryAddSymbol("", categoryWatchlist, 61); > } > > Buy=0; > > > > From: [email protected] <mailto:amibroker%40yahoogroups.com> [mailto:[email protected] <mailto:amibroker%40yahoogroups.com> ] On Behalf > Of ta > Sent: Tuesday, September 29, 2009 9:56 PM > To: [email protected] <mailto:amibroker%40yahoogroups.com> > Subject: [amibroker] Add addtocompiste generated ticker to a watchlist > > > > > > I did not see a flag that would add a ticker created by addtocomposite > function to a watchlist. Is there a way of doing this as the new tickers are > created? TA >
<<image001.jpg>>
<<image002.jpg>>
