PureBytes Links
Trading Reference Links
|
Hi Adrian --
Yes, you can add more than one custom metric. The value for each will be listed in a column of its own when you do an optimization. But you must pick only one of them as The objective function when you are doing an automated walk forward run.
Here is an example -- not necessarily a good example, but one that should be easy to follow.
//--------------------------------------
SetCustomBacktestProc(""); if(Status("action")== actionPortfolio)
{ bo = GetBacktesterObject(); bo.backtest(); st = bo.getperformancestats(0); KValue = st.getvalue("KRatio"); CARMDDValue = st.getvalue("CAR/MDD"); UPIValue = st.getvalue("UlcerPerformanceIndex");
Testing = KValue + CARMDDValue + UPIValue; bo.addcustommetric("Testing",Testing); bo.addcustommetric("KValue",KValue); bo.addcustommetric("CAR/MDD",CARMDDValue); bo.addcustommetric("UPI",UPIValue);
}
MAlen1 = Optimize("MALength1 ",5,1,25,2); MAlen2 = Optimize("MALenght2",4,2,26,2);
MA1 = EMA(C,MAlen1); MA2 = EMA(C,MAlen2);
Buy = Cross(MA2,MA1); Sell = Cross(MA1,MA2);
//--------------------------------------
Thanks, Howard
On Tue, Mar 11, 2008 at 6:37 PM, tayamaan < tayamaan@xxxxxxxxx> wrote:
Hello all! Adding a custom metric to the standard set of metrics in
the back test in Amibroker is not a problem. Would it be possible to
use a selected set (Say ... 5) of metrics of the default settings
only? I haven't found any info on this yet!
Kind Regards
Adrian
__._,_.___
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
__,_._,___
|