I'll take a look at it a bit later.
FYI - a lot of the OLE docs are in the release notes.
Take a look at the Object Model in the help file and note the highest AFL
version (different from AB version number). Then go back an find the
release note that begins with the next higher AFL version and then cut and paste
all of the ole stuff and you'll have an up-to-date ole
reference.
d
Manual works OK but you can't manually do what I
want. I am trying to run individual backtester over a watchlist so
results are reported for each opt step of each ticker ( for example, 10
tickers x 10 opt steps = 100 lines in results window. I am using
AA.Optimize(1); // 1 = Individual
backtester
in the .js file to call the individual
optimizer. Seems to work fine except I would
like to have a ticker column to sort on. I found info on
methods/properties of Analysis object in the help file Object
Model.
If you are interested in trying it, I have
attached the 2 files I am using. JS file has been renamed to tempjs - it is
filled with a bunch of comments because I am really trying to learn this
COM stuff, and especially the analysis object, once and for
all.
Steve
----- Original Message -----
Sent: Sunday, May 21, 2006 6:27
PM
Subject: RE: [amibroker] COM/OLE
question
I can't get it to show the tickers with the interation
like in your picture when I try it manually... How the heck are
you getting that? Try it manually and see if you can make it
happen.
d
Thanks D - here is a picture. I ran the
optimizer, individual mode, from OLE. The first column ( where the ticker
usually is ) now has the opt step, followed by the ticker in parens. When
I sort this column, it gets sorted by opt step.
Steve
----- Original Message -----
Sent: Sunday, May 21, 2006 5:39
PM
Subject: RE: [amibroker] COM/OLE
question
You lost me on "the ticker is
prefixed by the opt step". Did you run Optimization, Backtest, ??
and what are you looking at: Report?, AA Results
list?
How about a picture, formula, ??
d
OK guys, thank you both *very much*,
I have the full blown version working now. 8 - )
Just one final question (pleeeease?). As
is, I can't sort by ticker because the ticker is prefixed by the opt
step. I am guessing that the best (only?) solution for
this would be to learn the custon backtest interface and add a column
with the ticker only?
Steve
----- Original Message -----
Sent: Sunday, May 21, 2006 1:13
PM
Subject: RE: [amibroker]
COM/OLE question
you can't run an optimization via
ole/com WITHIN AB. You'll need to put the jscript code into an
external file with a .js extension and then run it by double
clicking the js file.
d
Hi All - I wonder if someone who is
good with COM/OLE interface could take a look at the small code
below and see if there is anything wrong? I am trying to call the
individual optimizer via COM/OLE, and I am getting the Amibroker
error message "Can not create that many optimization
variables", but I am only using one optimization variable.
Can anyone see some problem with the code that is causing
this? Thanks very much!
Steve
// enable an AFL scripting host
EnableScript ( "jscript" );
// AFL code
pds = Optimize( "Periods", 6,
3,
9,
3 );
Buy = Cover = Cross( Close, MA( Close, pds )
);
Sell = Short = Cross( MA( Close, pds ), Close
);
// begin script
<%
// create AmiBroker object
AB = new ActiveXObject( "Broker.Application" );
// retrieve analysis object
AA = AB.Analysis;
// set which tickers to run on
AA.ApplyTo = 1; // 1=current
ticker
// set range
AA.RangeN = 15; // last 15 quotes
// set range type
AA.RangeMode = 1; // 1=n last
quotes
// select which module to run
AA.Optimize( 1 ); //
1=individual
// report results
AA.Report( "" ); // display
report if "path/filename" is empty string
// end script
%>
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
YAHOO! GROUPS LINKS
|