Code: Select all
//Adjusted profit factor in EasyLanguage is as follows.
APF=((NumWinTrades -SquareRoot(NumWinTrades))*(GrossProfit/NumWinTrades))/
-((NumLosTrades +SquareRoot(NumLosTrades))*(GrossLoss/NumLosTrades))
I guess the sample is not EasyLanguege.
Would you please help me.
Code: Select all
// TODO: Enter your formula to replace the samples below
/************************************* Sample 1 ******************************************/
if (StrategyPerformance.MaxStrategyDrawDown != 0) {
return StrategyPerformance.NetProfit / (-StrategyPerformance.MaxStrategyDrawDown);
}
/* This function maximizes the ratio of Net Profit to Max Drawdown. The goal of this function is to find the trading rules that have a high net profit, but a small total drawdown over the back-tested period. */