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?
I want to export “Optimize parameter” and “Net Profit” to CSV file.
So I need to get the Net Profit in the program.
Do you have any idea about “get the Net Profit and don’t use CustomBacktest” ?
Re-read my previous reply. It contains all necessary info. Optimization output list IS already a CSV and contains Net Profit out of the box. No need for CBT. Just press Ctrl+C to copy or batch to export.
Because I want to analysis hundred of symbol, so I couldn’t use Ctrl+C to copy.
Can you give me a example about using batch to export CSV file automatically.
And the CSV file contain:
Optimize parameter
Net Profit
For example:
parameter1, parameter2, parameter3, Net Profit
parameter1, parameter2, parameter3, Net Profit
parameter1, parameter2, parameter3, Net Profit
parameter1, parameter2, parameter3, Net Profit
parameter1, parameter2, parameter3, Net Profit
.
.
.