Amibroker use "Individual Optimize" and get "Net Profit"

0 votes
asked Jul 12 in AmiBroker by Ken

I want to optimize all stock Individually, and get "Net Profit" from the report.

Here is the sample code about get "Net Profit":

SetCustomBacktestProc("");
if( Status("action") == actionPortfolio )
{
    bo = GetBacktesterObject();
    bo.Backtest(); // run default backtest procedure
    st = bo.GetPerformanceStats(0); // get stats for all trades        
    NetProfit = st.GetValue("NetProfit");                
}

But when I used "Individual Optimize", it always occurred an error:

Notice. Customer Backtester is NOT yet supported in Multithreaded Individual Optimization.

If I delete "SetCustomBacktestProc("")", I can't get "Net Profit" from the report.

Can you help me solve the problem or give me some option?

1 Answer

0 votes
answered Jul 13 by admin (9,260 points)
For ANY AFL programming question use http://forum.amibroker.com
...