I'm trying to create my own optimization criteria and I have a doubt. I need to optimize minimizing the number of bars per trade. To do this I replace in a copied file on the "Type" folder this line of code:
public override double GetPerformanceValue(SystemPerformance systemPerformance)
{
return systemPerformance.AllTrades.TradesPerformance.AvgB arsInTrade;
}
but I need to specify that this value has to be minimized. Where do I specify it? I don't see on the remaining code any line to minimize or maximize
Comment