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 <[EMAIL PROTECTED]> 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
>
>
>