PureBytes Links
Trading Reference Links
|
Many thanks dingo. I missed the Export() method.
That worked brilliantly.
Paul
--- In amibroker@xxxxxxxxxxxxxxx, "dingo" <dingo@xxx> wrote:
>
> The Explore method does NOT create a report. The only results you
get are in
> the AA results grid. You can save those results by using the Export
method.
> Pls refer to the AB OLE automation object model:
>
> http://www.amibroker.com/guide/objects.html
>
> d
>
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx
> > [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of polomorabe
> > Sent: Sunday, June 03, 2007 8:31 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Is it possible to save report from
> > exploration scan with automation interface
> >
> > Hello,
> >
> > I'm trying to automate analysis exploration scans using the object
> > automation intreface. I use the Explore() method, followed by the
> > Report() method, in order to save the report to a text file.
> > Interestingly, I test the result from the Report() call - it seems to
> > work, but nothing is written to the file.
> >
> > Has anyone been able to do this?
> >
> > Here is my code:
> >
> > // create AB object
> > oAB = new ActiveXObject("Broker.Application");
> > oAB.Visible = true;
> >
> > // load DB
> > var sDbFileLocation = "E:\\Paul\\Paul's Documents\\Amibroker\\TC2005";
> > if( oAB.LoadDatabase( sDbFileLocation ) == false ) {
> > WScript.Echo("Can't load TC2005 DB");
> > }
> > else {
> > // retrieve automatic analysis object
> > oAA = oAB.Analysis;
> >
> > // load formula from external file
> > var sAflFileLocation = "E:\\Paul\\Paul's
> > Documents\\Amibroker\\AFL\\Explorations\\TestScan.afl";
> > if( oAA.LoadFormula( sAflFileLocation ) == false ) {
> > WScript.Echo("Can't load AFL");
> > }
> > else {
> > // setup filters
> > oAA.ClearFilters();
> > oAA.ApplyTo = 2; // use filters
> > oAA.Filter( 0, "group" ) = 1; // stocks
> > oAA.RangeMode = 2; // use last n days quotes
> > oAA.RangeN = 3; // use 1 day quotes
> >
> > // run exploration
> > oAA.Explore();
> > var sAflReportLocation = "E:\\Paul\\Paul's Documents\\Report.txt";
> > if( oAA.Report( sAflReportLocation ) == false ) {
> > WScript.Echo("Can't save report")
> > }
> > oAB.SaveDatabase();
> > }
> > }
> >
> >
> >
> > 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
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/
|