Bill,
I think I had the same issue a few days
ago. Tomasz suggested adding “CategoryRemoveSymbol()” to my
code, but it is the flow of code that makes it work…
You use two source Watchlists. The first
is a “Master” list of all the symbols you would trade. (In my
case, I call this “Tradable Symbols”.) The second is one of
several “Source” Watchlists.
You always use the “Master”
Watchlist as the Exploration filter. Because you are always running
through your Master, all symbols will be removed from the target Watchlist just
prior to processing that symbol.
Your “Source” Watchlist is
used by the “InWatchList” function. If “InWatchList”
is True, then process the symbol. For example:
/*
** Filter by
Master List in AA Window
*/
//Remove current symbol
from target Watchlist.
//This ensures
that <TargetWatchlist> is always clean.
CategoryRemoveSymbol
(
""
,
categoryWatchlist, <TargetWatchlist>);
//Use InWatchlist
to check for symbol in Source List
ValidSymbol =
InWatchList
(
""
,
categoryWatchlist, <TargetWatchlist>);
If (ValidSymbol)
{
// Your processing code here
}
I think it would be a more elegant
solution to be able to clean out the target Watchlist, but this works well.
I hope it works for you.
Regards,
Dan.
From: amibroker@xxxxxxxxxxxxxxx
[mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of Graham
Sent: Sunday, August 14, 2005 3:08
PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Simple
code stumper
you could maybe code into the
start of your explroation to check if
the watchlit is empty
On 8/15/05, wavemechanic <fimdot@xxxxxxxxx>
wrote:
> Steve & Graham:
>
> I didn't adequately explain the problem that
I'm trying to solve - code the
> functionality of watchlist's Erase(makes
empty) option in order to cleanout
> a watchlist before an exploration. The
code is OK when using the same
> symbol list as used to generate the
watchlist. But if a different symbol
> list is used then it does not work and simply
adds new information to the
> existing watchlist data. I have been
erasing manually and that is quick and
> easy. But I forgot once and ran into
some trouble, hence the attempt to
> produce Erase(makes empty) functionality for
any symbol list used. However,
> I don't think at this time AFL allows this to
be done. So, have to figure
> out a work around that will make this process
"idiot" proof.
>
> Bill
>
>
> ----- Original Message -----
> From: Graham
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Saturday, August 13, 2005 6:49 PM
> Subject: Re: [amibroker] Simple code stumper
>
> It worked for me by removing the space
between the "" in
> CategoryRemoveSymbol("",
categoryWatchlist, i);
>
> I also assume you have a filter=1; and addcolumn
lines to allow exploring
> inAA
>
> On 8/14/05, ronbo
<ronbo@xxxxxxxxxxxxxx> wrote:
> > i think you need a "" not a
" ".
> >
> > hth,
> > ron
> >
> >
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx
[mailto:amibroker@xxxxxxxxxxxxxxx]On
> Behalf
> > Of wavemechanic
> > Sent: Saturday, August 13, 2005 1:00 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: Re: [amibroker] Simple code
stumper
> >
> >
> > Forgot to mention that this is being
done within the Explore environment.
> > ----- Original Message -----
> > From: wavemechanic
> > To: AmiBroker, User
> > Sent: Saturday, August 13, 2005 3:19 PM
> > Subject: [amibroker] Simple code stumper
> >
> >
> > I'm stumped on this simple code. I
am trying to use AFL to empty a
> > watchlist before putting new symbols
in. Would appreciate it if someone
> > would tell me why the following two
examples do not remove the symbols in
> > the first four watchlists (numbers 0-3)?
> > TIA.
> > Bill
> >
> ----------------------------------------------------------------------------
> > for(i = 0; i
< 4; i++)
> > {
> >
CategoryRemoveSymbol(" ", categoryWatchlist, i);
> > }
> >
----------------------------------------------
> > for(i = 0; i < 4; i++)
> > {
> >
CategoryRemoveSymbol(Name(), categoryWatchlist, i);
> > }
> >
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.338 / Virus Database:
267.10.8/71 - Release Date: 08/12/05
> >
> >
> >
> > 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
> >
> > Visit your group
"amibroker" on the web.
> >
> > To unsubscribe from this group,
send an email to:
> >
amibroker-unsubscribe@xxxxxxxxxxxxxxx
> >
> > Your use of Yahoo! Groups is
subject to the Yahoo! Terms of Service.
> > --
> > No virus found in this outgoing message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.338 / Virus Database:
267.10.2/65 - Release Date: 8/7/2005
> >
> >
> >
> >
> > 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
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing
Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
>
>
> ________________________________
>
>
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.338 / Virus Database:
267.10.8/71 - Release Date: 08/12/05
>
>
>
>
> 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
>
>
>
>
>
> SPONSORED LINKS
> Investment management software Investment
property software Investment
> software
> Investment tracking software Return on
investment software Stock investment
> software
> ________________________________
> YAHOO! GROUPS LINKS
>
> Visit your group "amibroker"
on the web.
>
> To unsubscribe from this group, send an
email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> Your use of Yahoo! Groups is subject to
the Yahoo! Terms of Service.
> To unsubscribe from this group, send an
email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> Your use of Yahoo! Groups is subject to
the Yahoo! Terms of Service.
> Your use of Yahoo! Groups is subject to
the Yahoo! Terms of Service.
> ________________________________
>
--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm
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
SPONSORED LINKS
YAHOO! GROUPS LINKS