[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Re: need help in optimizing



PureBytes Links

Trading Reference Links

listA = categoryfind("A", categorywatchlist);
listB...
listC...
 
buy = h > ref(hhv(h, 180), -1) and !(inwatchlist(listA) or inwatchlist(listB) or inwatchlist(listC))
you will make it run much faster if you put the listno yourself rather than using CategoryFind. if you think about it
every cateorgyFind statement is run as many times as there are symbols in your universe.
The fastest way is to do an exploration of all the stocks that are not in A, B, C etc and save all results in another watchlist
then all you have to do is buy = h > ref(hhv(h, 180), -1);


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of murthysuresh
Sent: Saturday, 2 June 2007 12:36 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: need help in optimizing

The scan does this.
buy stocks making 9 month high but it is not in watchlist A or
Watchlist B or watchlist C

When i breakdown the scan parameters
"buy stocks making 9 month high " This piece of the scan takes couple
of minutes

not in watchlist A or Watchlist B or watchlist C adds 20 minutes to
the scan.

How do i optimise it.

--- In amibroker@xxxxxxxxxps.com, "dingo" <dingo@xxx> wrote:
>
> Describe what you're trying to do in words.
>
> d
>
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxps.com
> > [mailto:amibroker@xxxxxxxxxps.com] On Behalf Of murthysuresh
> > Sent: Friday, June 01, 2007 8:44 PM
> > To: amibroker@xxxxxxxxxps.com
> > Subject: [amibroker] need help in optimizing
> >
> > The following script takes 20 minutes to execute when i set the
scan
> > to last 1 day only. When i broke down the factors into multiple
> > pieces,
> > i found that the following line adds 15 minutes to the scan
times.
> > how can i optimize it so it runs faster
> >
> > ChkWatchlist=InWatchList(CategoryFind("Watchlist A",
> > categoryWatchlist )) OR InWatchList(CategoryFind("BuyMA",
> > categoryWatchlist )) OR InWatchList(CategoryFind("Congestion",
> > categoryWatchlist )) OR InWatchList(CategoryFind
> > ("Breakout_continueation", categoryWatchlist ));
> >
> >
> >
> >
> > -- The actual script that i ran.
> >
> > yestprice=Ref(High,-1);
> > ChkWatchlist=InWatchList(CategoryFind("Watchlist A",
> > categoryWatchlist )) OR InWatchList(CategoryFind("BuyMA",
> > categoryWatchlist )) OR InWatchList(CategoryFind("Congestion",
> > categoryWatchlist )) OR InWatchList(CategoryFind
> > ("Breakout_continueation", categoryWatchlist ));
> > Buy=(High>HHV(yestprice,180) AND Close<25) AND MA(V,20)>200000
AND
> > (ChkWatchlist==0);
> > //Buy=High>HHV(yestprice,180) ;
> > Filter=Buy;
> >
> > Thanks seede
> >
> >
> >
> >
> > 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> >
> > 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___