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

[amibroker] need to optimise this script



PureBytes Links

Trading Reference Links

Hello
I run this script on a watchlist of 500 symbols every 30 minutes. It 
runs for 10 minutes. Could someone help in optimizing the script

Thanks

Seede


/*Filter=InWatchList(5);
TimeFrameSet( inHourly);
Buy=Volume>2*EMA(Volume,9);
TimeFrameRestore();
*/


relativevolume=(((LastValue(TimeNum())-93000.00)/63000)) * LastValue
(V,20);
wlnumber = CategoryFind("wlUsualSuspectShortFilter", 
categoryWatchlist );
Luckybreakdown=Close>10 AND Low<Ref(LLV(L,20),-1) AND V>1.2*  
(relativevolume) AND LastValue(DateNum() )==GetRTData("UpdateDate") 
AND InWatchList(wlnumber);
if(!LastValue(Luckybreakdown)){
wlnumber = CategoryFind("wlUsualSuspectsLongFilter", 
categoryWatchlist );
Luckybreakout=Close<50 AND High>Ref(HHV(H,20),-1) AND V>1.2*  
(relativevolume) AND LastValue(DateNum() )==GetRTData("UpdateDate");
}




Buy=False;
Sell=False;

// Three day reversal filter watchlist.
wlnumber = CategoryFind("wlThreeDayReversalFilterBuy", 
categoryWatchlist );
Buy= InWatchList(wlnumber) AND LastValue(DateNum() )==GetRTData
("UpdateDate")  AND Close>Open;
if(!LastValue(Buy)) {
wlnumber = CategoryFind("wlThreeDayReversalFilterSell", 
categoryWatchlist );
Sell= InWatchList(wlnumber) AND C<O AND  LastValue(DateNum() )
==GetRTData("UpdateDate");
}





AddColumn(Buy,"3 Day reversal buy ");

AddColumn(Sell,"3 Day reversal sell ");
AddColumn(Luckybreakout,"Usual Suspects Bull ");
AddColumn(Luckybreakdown,"Usual Suspects Bear ");

AddColumn(TimeNum(),"timenum");
AddColumn(relativevolume,"relativevolume");
AddColumn(GetRTData("changetime"),"changetime");
AddColumn(GetRTData("Updatetime"),"updttime");


Filter = Buy OR Sell OR Luckybreakout OR Luckybreakdown;



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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/