PureBytes Links
Trading Reference Links
|
Herman,
Adding a simple metric at the portfolio level is, as you would
expect, very straight forward. See the user guide:
http://www.amibroker.com/guide/a_custommetrics.html
I do not know whether idividual backtests are treated any differently
than portfolio level backtest. I have not experimented with that.
My guess would be that, as an implementation detail, the exact same
code is run from an internal watchlist of length 1 rather than the
entire contents of your actual multi symbol watchlist. That being the
case, then Name() will still not work for you due to the same reasons
that Open, Close, etc. do not work (i.e. there is no current symbol
even with a portfolio that happens to be of size 1).
What is unique about your scenario is that you appear to want to do
something with individual symbols before completing the post
processing.
The typical scenario would be to simply let the backtester run to
completion, then query the system wide performance stats from which
to derive your own metric. Also common would be to reference
composites constructed along the way via Foreign
("~MyComposite", "X"). If you can push your logic into the
calculation of a composite, that might help.
P.S. I've always used actionPortfolio without any problem, as per the
user guide link above. I haven't tried from OLE, but doubt that it
would make a difference.
I don't see any explicit description for actionPortfolio anywhere
(only it's actual usage in examples), and the only description I see
for actionBacktest is when using Status("actionEx") as opposed to
Status("action"). Yet, there are developer notes mentioning
actionBacktest that predate "actionEx". Still, I would stick with
actionPorfolio unless you find a reason not to.
Mike
------------------------------------
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL 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/
|