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

[amibroker] Re: Automating AA results handling (w/o Batman)



PureBytes Links

Trading Reference Links

Excellent! Thanks Dan!

~Brian

--- In amibroker@xxxxxxxxxxxxxxx, "Dan Clark" <dan_public@xxx> wrote:
>
> Dave,
> 
>  
> 
> Here is a Jscript that I use to run AFL scripts one after 
another.   To be
> precise, it's actually a hacked up version of what I use.   
(My "production"
> script does logging and some error checking).    It shows how 
scans and
> explorations can be chained together.   It loads each AFL and its 
associated
> parameters and then executes the AFL.   
> 
>  
> 
> To execute multiple AFL scripts, just run the AFL scripts one 
after another
> like I have here.  If you wanted to be slick, you could 
instantiate the
> Broker.Application and Analysis once and then loop through 
changing the
> parameters.
> 
>  
> 
> You would need to edit this to your parameters (paths, files and 
other
> parameter settings) and then save it to a file in the ..\Scripts 
folder.
> The file should have a ".js" extension.
> 
>  
> 
> You can call this Jscript file from the AB Tools Menu or you can 
schedule it
> to run using the Windows Scheduler.  
> 
>  
> 
> Regards,
> 
>  
> 
> Dan.
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> /* create AB object */
> 
> AB = new ActiveXObject("Broker.Application");
> 
>  
> 
> /* retrieve automatic analysis object */
> 
> AA = AB.Analysis;
> 
>  
> 
> /* load formula from external file */
> 
> AA.LoadFormula("C:\\Program
> 
Files\\AmiBroker\\Formulas\\Systems_DailyScans\\A1_QPATCIndexes_Count
.afl")
> 
>  
> 
> /* setup filters */
> 
> /* backtest over symbols present in market 0 only (zero-based 
number) */
> 
> AA.ClearFilters(); 
> 
>  
> 
> /* set apply to and range */
> 
> AA.ApplyTo = 0; // use symbols
> 
> AA.RangeMode = 2; // use last day's quotes
> 
> AA.RangeN = 1;
> 
>  
> 
> /* run Scan */
> 
> AA.Explore();
> 
>  
> 
>  
> 
> /* create AB object */
> 
> AB = new ActiveXObject("Broker.Application");
> 
>  
> 
> /* retrieve automatic analysis object */
> 
> AA = AB.Analysis;
> 
>  
> 
> /* load formula from external file */
> 
> AA.LoadFormula("C:\\Program
> 
Files\\AmiBroker\\Formulas\\Systems_DailyScans\\A2_QPAddCompositeInde
xes7.af
> l")
> 
>  
> 
> /* setup filters */
> 
> /* backtest over symbols present in market 0 only (zero-based 
number) */
> 
> AA.ClearFilters(); 
> 
>  
> 
> /* set apply to and range */
> 
> AA.ApplyTo = 0; // use symbols
> 
> AA.RangeMode = 2; // use last day's quotes
> 
> AA.RangeN = 1;
> 
>  
> 
> /* run Scan */
> 
> AA.Explore();
> 
>  
> 
>  
> 
> /* create AB object */
> 
> AB = new ActiveXObject("Broker.Application");
> 
>  
> 
> /* retrieve automatic analysis object */
> 
> AA = AB.Analysis;
> 
>  
> 
> /* load formula from external file */
> 
> AA.LoadFormula("C:\\Program
> 
Files\\AmiBroker\\Formulas\\Systems_DailyScans\\B_QPAddIndexRelativeS
trength
> .afl")
> 
>  
> 
> /* setup filters */
> 
> /* backtest over symbols present in market 0 only (zero-based 
number) */
> 
> AA.ClearFilters(); 
> 
> AA.Filter( 0, "watchlist" ) = 49;
> 
>  
> 
> /* set apply to and range */
> 
> AA.ApplyTo = 2; // use filters
> 
> AA.RangeMode = 2; // use last day's quotes
> 
> AA.RangeN = 1;
> 
>  
> 
> /* run backtest and display report */
> 
> AA.Scan();
> 
>  
> 
>  
> 
> /* create AB object */
> 
> AB = new ActiveXObject("Broker.Application");
> 
>  
> 
> /* retrieve automatic analysis object */
> 
> AA = AB.Analysis;
> 
>  
> 
> /* load formula from external file */
> 
> AA.LoadFormula("C:\\Program
> 
Files\\AmiBroker\\Formulas\\Systems_DailyScans\\C_QPAddIndexRank.afl"
)
> 
>  
> 
> /* setup filters */
> 
> /* backtest over symbols present in market 0 only (zero-based 
number) */
> 
> AA.ClearFilters(); 
> 
> AA.Filter( 0, "watchlist" ) = 48;
> 
>  
> 
> /* set apply to and range */
> 
> AA.ApplyTo = 2; // use filters
> 
> AA.RangeMode = 2; // use last day's quotes
> 
> AA.RangeN = 1;
> 
>  
> 
> /* run backtest and display report */
> 
> AA.Scan();
> 
>  
> 
>  
> 
> /* create AB object */
> 
> AB = new ActiveXObject("Broker.Application");
> 
>  
> 
> /* retrieve automatic analysis object */
> 
> AA = AB.Analysis;
> 
>  
> 
> /* load formula from external file */
> 
> AA.LoadFormula("C:\\Program
> 
Files\\AmiBroker\\Formulas\\Systems_DailyScans\\G_CMFAndOBVToPriceLRD
vrg_WLo
> ngTrend.afl")
> 
>  
> 
> /* setup filters */
> 
> /* backtest over symbols present in market 0 only (zero-based 
number) */
> 
> AA.ClearFilters(); 
> 
> AA.Filter( 0, "watchlist" ) = 1;
> 
>  
> 
> /* set apply to and range */
> 
> AA.ApplyTo = 2; // use filters
> 
> AA.RangeMode = 2; // use last day's quotes
> 
> AA.RangeN = 1;
> 
>  
> 
> /* run backtest and display report */
> 
> AA.Explore();
> 
>  
> 
>  
> 
> AB.SaveDatabase();
> 
>  
> 
>  
> 
>  
> 
>   _____  
> 
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
On Behalf
> Of MarketMonk777
> Sent: Tuesday, March 14, 2006 9:54 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Automating AA results handling (w/o 
Batman)
> 
>  
> 
> Hi Dan,
> 
>  
> 
> Thanks for the code below.  You wouldn't happen to have any 
scripts that
> will automatically run a number of AAs in a batch mode do you?   
> 
>  
> 
> Dave
> 
>  
> 
>   _____  
> 
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
On Behalf
> Of Dan Clark
> Sent: Tuesday, March 14, 2006 8:26 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Automating AA results handling (w/o 
Batman)
> 
>  
> 
> Brian,
> 
>  
> 
> Add this at the top:
> 
>  
> 
> CategoryRemoveSymbol("", categoryWatchlist, 1);  //Watchlist = 1
> 
> .
> 
>  
> 
> //Some criteria code
> 
>  
> 
> .
> 
>  
> 
> //Add Symbols to Watchlist 1
> 
> if (bCriteriaIsMet)
> 
>      CategoryAddSymbol( "" , categoryWatchlist, 1); //Watchlist = 1
> 
>       
> 
>  
> 
>  
> 
>  
> 
>   _____  
> 
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
On Behalf
> Of Brian
> Sent: Tuesday, March 14, 2006 8:17 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Automating AA results handling (w/o Batman)
> 
>  
> 
> I used to have a small script that would automatically take 
> exploration results and put them in a specific watchlist. I have 
> looked at Batman but I think that might be overkill for what I 
need. 
> Only other functionality that would be nice is such a script would 
be 
> to automatically delete the contents of the watchlist prior to 
> repopulating it.
> 
> Anyone got this script handy? Mine got lost in the shuffle awhile 
back.
> 
> Thanks in advance!
> 
> Brian
> 
> 
> 
> 
> 
> 
> 
> 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
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+management+software&w1=Inves
> 
tment+management+software&w2=Real+estate+investment+software&w3=Inves
tment+p
> 
roperty+software&w4=Software+support&w5=Real+estate+investment+analys
is+soft
> ware&w6=Investment+software&c=6&s=200&.sig=_XXUzbE9l5lGlZNcMu4KNQ>
> management software 
> 
> Real
> <http://groups.yahoo.com/gads?
t=ms&k=Real+estate+investment+software&w1=Inve
> 
stment+management+software&w2=Real+estate+investment+software&w3=Inve
stment+
> 
property+software&w4=Software+support&w5=Real+estate+investment+analy
sis+sof
> 
tware&w6=Investment+software&c=6&s=200&.sig=5_sgDczz3ArKGMtJ9tFSJA>  
estate
> investment software 
> 
> Investment
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+property+software&w1=Investm
> 
ent+management+software&w2=Real+estate+investment+software&w3=Investm
ent+pro
> 
perty+software&w4=Software+support&w5=Real+estate+investment+analysis
+softwa
> re&w6=Investment+software&c=6&s=200&.sig=_N6zcwefgp4eg5n6oX5WZw>  
property
> software 
> 
> 
> Software
> <http://groups.yahoo.com/gads?
t=ms&k=Software+support&w1=Investment+manageme
> 
nt+software&w2=Real+estate+investment+software&w3=Investment+property
+softwa
> 
re&w4=Software+support&w5=Real+estate+investment+analysis+software&w6
=Invest
> ment+software&c=6&s=200&.sig=MJ2jP31F3n64RDZkDadU8w>  support 
> 
> Real
> <http://groups.yahoo.com/gads?
t=ms&k=Real+estate+investment+analysis+softwar
> 
e&w1=Investment+management+software&w2=Real+estate+investment+softwar
e&w3=In
> 
vestment+property+software&w4=Software+support&w5=Real+estate+investm
ent+ana
> 
lysis+software&w6=Investment+software&c=6&s=200&.sig=GmF8PlAJASx0wrSa
X5-Zlw>
> estate investment analysis software 
> 
> Investment
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+software&w1=Investment+manag
> 
ement+software&w2=Real+estate+investment+software&w3=Investment+prope
rty+sof
> 
tware&w4=Software+support&w5=Real+estate+investment+analysis+software
&w6=Inv
> estment+software&c=6&s=200&.sig=aMgGsKT4w29dMAYUzQUKzg>  software 
> 
>  
> 
>   _____  
> 
> YAHOO! GROUPS LINKS 
> 
>  
> 
> *	 Visit your group "amibroker
> <http://groups.yahoo.com/group/amibroker> " on the web.
>   
> *	 To unsubscribe from this group, send an email to:
>  amibroker-unsubscribe@xxxxxxxxxxxxxxx
> <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe> 
>   
> *	 Your use of Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/>  Terms of Service. 
> 
>  
> 
>   _____
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

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

<*> 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/