Gary, Yes, there's a categoryaddsymbols and
categoryremovesymbol and
AS AN EXAMPLE this statement used in the function below
shows how to empty those watchlists or
anyone of the groups.
CategoryRemoveSymbol(sym,categoryWatchlist,listnum);
can be changed to fill the group
by
CategoryAddSymbols(sym,categoryMarket,listnum);
where listnum is 0 to 255 if you
are going to use market as your category.
This is a test function used to clear a watchlist
before I add newly filtered tickers to it.
To run the routine as is, make sure you don't care what's
in the watchlist 30 the default, 2)
load in IB or AA, choose current ticker, 1 day range, open
the parameter pop up, hit the paramtrigger
and select scan if AA.
You will probably have to select VIEW / REFRESH ALL all to see that the list was emptied.
Hope this helps
JOE
// Makes a Watchlist
Empty
function
MakeEmptyWatchList( listnum )
{
// retrieve comma-separated list of symbols
in watch list
list =
CategoryGetSymbols( categoryWatchlist,Listnum);
for( i =
0; ( sym = StrExtract( list, i ) ) != ""; i++ )
{
CategoryRemoveSymbol(sym,categoryWatchlist,listnum);
}
return;
}
Listn =
Param("WtchList No.",
30,0,63,1);
trigger =
ParamTrigger("Clear WList","Click Here to Clear");
if
(trigger)
{
MAkeEmpty = MAkeEmptyWatchlist(Listn);
}
Buy=Sell=
0;
Plot
(Close,"Name",colorBlack,styleThick);
----- Original Message -----
Sent: Thursday, March 10, 2005 8:20 AM
Subject: [amibroker] Categories
Hi group,
I would like to set/define Market/Group
programmatically using script.
I know there is a function
('CategoryGetName') that would allow me to
read the category, is there a way
to do it the opposite way (to set a
new name and put it into AB
array)?
Probably something like:
CategorySetName(categoryMarket, "My
Stocks", 0);
The reason I need this function is because I'm still playing
and
testing AmiBroker and I still need to re-arrange (very often) the
Markets/Groups/Industries/Sectors to suit my needs.
I don't have
problems with Industries and Sectors because there is
already scripts for
this purpose.
Anyone could help me with
this?
Thanks,
Gary
----- Original Message -----
Sent: Thursday, March 10, 2005 8:20
AM
Subject: [amibroker] Categories
Hi group,
I would like to set/define
Market/Group programmatically using script.
I know there is a function
('CategoryGetName') that would allow me to
read the category, is there a
way to do it the opposite way (to set a
new name and put it into AB
array)?
Probably something like:
CategorySetName(categoryMarket,
"My Stocks", 0);
The reason I need this function is because I'm still
playing and
testing AmiBroker and I still need to re-arrange (very often)
the
Markets/Groups/Industries/Sectors to suit my needs.
I don't
have problems with Industries and Sectors because there is
already scripts
for this purpose.
Anyone could help me with
this?
Thanks,
Gary
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
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 Sponsor |
ADVERTISEMENT
| |
|
Yahoo! Groups Links