PureBytes Links
Trading Reference Links
|
Yes Fred, currently use that, was hoping to find "pure AFL /
scripting" solution.
Andrew
--- In amibroker@xxxxxxxxxxxxxxx, "Fred" <fctonetti@xxxx> wrote:
> If you are already using ABToo; this is cake ...
>
> NUMBER xxWLclear(NUMBER wl)
> Clears given watchlist.
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Andrew" <ae_perrin@xxxx> wrote:
> > Dave
> > Agree these functions would be useful, I use similar functions
I've
> > written in AFL already. I have these and many other functions
I've
> > written all in one AFL called AP_Functions.AFL. I just include -
> > #include "afl/AP_Functions.afl";
> > at the beginning of all my AFLs and then have easy access to all
my
> > personal functions. Currently I use the free ABtool to fill in
the
> > gaps. I will add Tomasz's script to my AP_Functions.AFL, if
> someone
> > has a script to clear a watchlist, could they share it. That
would
> > enable pure AFL solutions to handle all my AFL based Watchlist
> > manipulations
> >
> > Andrew
> >
> > // ***********************************************************
> > // WL_Count will count number of elements in a watchlist. 0 based
> > // ***********************************************************
> >
> > function WL_Count(WatchListNum)
> > {
> > i=-1;
> > List = GetCategorySymbols( categoryWatchlist, WatchlistNum);
> > for (j=0; (sTicker = StrExtract (List , j)) !=""; j++ )
> > {
> > i = i+1;
> > }
> > return i;
> > }
> >
>
> ///////////////////////////////////////////////////////////////////
/
> /
> > //WL_contains(Ticker,WatchlistNum) returns 1 if ticker present
in WL
>
> ///////////////////////////////////////////////////////////////////
/
> /
> >
> > function WL_contains(Ticker,WatchlistNum)
> > {
> > result = 0;
> > List = GetCategorySymbols( categoryWatchlist, WatchlistNum);
> > for (j=0; (sTicker = StrExtract (List , j)) !=""; j++ )
> > {
> > if( Ticker == sTicker) {result = 1;}
> > }
> > return result;
> > }
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx>
> > wrote:
> > > hi Tomasz,
> > >
> > > it would be great if there were AFL commands for working with
> > watchlists on
> > > the fly. I've wished for these many times.
> > >
> > > maybe something like these:
> > >
> > > WatchlistGetTickers(WatchlistName) --> ListOfTickersInWatchlist
> > > WatchlistPutTicker(WatchlistName, Ticker) [adds Ticker to
> > Watchlist]
> > > WatchlistEmpty(WatchlistName) [removes all tickers from
Watchlist]
> > > WatchlistContains(WatchlistName, Ticker) -->
> > TickerIsInWatchlistBoolean
> > >
> > > make sense? any chance of adding something like these at some
> > point?
> > >
> > > thanks,
> > >
> > > dave
> > >
> > >
> > > > Yes there is a way but involves scripting.
> > > >
> > > > Condition = LastValue( C > MA( C, 50 ) );
> > > >
> > > > ticker = Name();
> > > >
> > > > wlnumber = 1;
> > > >
> > > > EnableScript("jscript");
> > > >
> > > > <%
> > > >
> > > > if( AFL("condition" ) )
> > > >
> > > > {
> > > >
> > > > AB = AFL.CreateObject("Broker.Application");
> > > >
> > > > AB.Stocks( AFL("ticker" ) ).WatchListBits |= 1 << AFL
> > ( "wlnumber" );
> > > >
> > > > }
> > > >
> > > > %>
> > > >
> > > > Buy=0;
> > > >
> > > >
> > > > Use View->Refresh All to refresh symbol list.
> > > >
> > > > Hope this helps.
> > > >
> > > > Best regards,
> > > > Tomasz Janeczko
> > > > amibroker.com
> > > > ----- Original Message -----
> > > > From: "kk12338" <kk2628@xxxx>
> > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > Sent: Friday, September 05, 2003 3:13 PM
> > > > Subject: [amibroker] add explore result to watchlist
> > automatically
> > > >
> > > >
> > > > > Hi,
> > > > >
> > > > > I have an AFL explore for different criteria like MA
cross,
> > Vol, ATR,
> > > > > etc a total 15 of them. Currently I have to manually
select
> > those
> > > > > stocks meeting certain criteria and use "add selected
results
> > to
> > > > > watchlist..." in different watchlist and before doing this
I
> > have to
> > > > > empty the watchlist.
> > > > >
> > > > > Is there an automatic way so that I can empty the
watchlist
> > then add
> > > > > these stocks to the respective watchlist based on
different
> > criteria ?
> > > > >
> > > > > I see there is a getcategorysymbols(), I think a
> > putcategorysymbols()
> > > > > may help.
> > > > >
> > > > > Many thanks
> > > > > KK
> > > > >
> > > > >
> > > > >
> > > > > Send BUG REPORTS to bugs@xxxx
> > > > > Send SUGGESTIONS to suggest@xxxx
> > > > > -----------------------------------------
> > > > > 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
> > > > >
> > > > > Your use of Yahoo! Groups is subject to
> > > > http://docs.yahoo.com/info/terms/
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > Send BUG REPORTS to bugs@xxxx
> > > > Send SUGGESTIONS to suggest@xxxx
> > > > -----------------------------------------
> > > > 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
> > > >
> > > > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> > > >
> > > >
> > > >
> > > >
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
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
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|