My fitness function is like this
if (StrategyPerformance.TotalTrades > 200) {
if (StrategyPerformance.AvgBarsInWinningTrades > 4) {
return StrategyPerformance.PercentProfitable*StrategyPerformance.Profitfactor;
}
}
Than im getting in optimization report Average bars in winner = 2 and total number of trades = 79. Is custom fitness working ?? For MC 5.5 at least StrategyPerformance.TotalTrades was working
Another question: %Profitable is 18.987342, ProfitFactor 13.11696 how the custom criteria comes 7.420098 ??? (it should be multiplication of both)
See attachment
Krzysztof
is custom fitness working ??
-
- Posts: 19
- Joined: 23 Sep 2012
- Been thanked: 2 times
is custom fitness working ??
- Attachments
-
- Report_2012-09-25_22-22-02.rar
- (1.06 KiB) Downloaded 154 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: is custom fitness working ??
We can confirm that Custom Fitness Function in MultiCharts 5.5 and MultiCharts 8.0 works the same way.
With your criteria “return” would not be executed and all custom criteria values would be "-".
Probably “return” is called in other blocks or you have submitted wrong part of the code.
In your report:
Total Trades changes from 79 to 95
Avg Bars in Winner = 2
That means the condition
if (StrategyPerformance.TotalTrades > 200) {
if (StrategyPerformance.AvgBarsInWinningTrades > 4)
is not met.
In this case Custom Criteria output would be "-" in order not to interfere the sorting.
Custom Criteria has a value in each line of the provided report, that means the report you have attached does not correspond to the provided code.
With your criteria “return” would not be executed and all custom criteria values would be "-".
Probably “return” is called in other blocks or you have submitted wrong part of the code.
In your report:
Total Trades changes from 79 to 95
Avg Bars in Winner = 2
That means the condition
if (StrategyPerformance.TotalTrades > 200) {
if (StrategyPerformance.AvgBarsInWinningTrades > 4)
is not met.
In this case Custom Criteria output would be "-" in order not to interfere the sorting.
Custom Criteria has a value in each line of the provided report, that means the report you have attached does not correspond to the provided code.
- Attachments
-
- Book.xls
- (37.5 KiB) Downloaded 155 times