is custom fitness working ??

Questions about MultiCharts and user contributed studies.
krzysiaczek99
Posts: 5
Joined: 23 Sep 2012
Been thanked: 2 times

is custom fitness working ??

Postby krzysiaczek99 » 25 Sep 2012

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
Attachments
Report_2012-09-25_22-22-02.rar
(1.06 KiB) Downloaded 71 times

User avatar
Henry MultiСharts
Posts: 8378
Joined: 25 Aug 2011
Has thanked: 1199 times
Been thanked: 2677 times

Re: is custom fitness working ??

Postby Henry MultiСharts » 28 Sep 2012

krzysiaczek99, our engineers are analyzing this behavior.

User avatar
Henry MultiСharts
Posts: 8378
Joined: 25 Aug 2011
Has thanked: 1199 times
Been thanked: 2677 times

Re: is custom fitness working ??

Postby Henry MultiСharts » 02 Oct 2012

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.
Attachments
Book.xls
(37.5 KiB) Downloaded 59 times


Return to “MultiCharts”