Custom Criteria  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
3strategy
Posts: 22
Joined: 31 Dec 2014
Has thanked: 2 times
Been thanked: 1 time

Custom Criteria

Postby 3strategy » 29 Jan 2015

I have 2 question regarding custom criteria optimization:
1) I want an result that has a combination of Profit + high profitability rate + low time in the market.
I put the following formula:

Code: Select all

if (StrategyPerformance.AvgBarsInWinningTrades!= 0) {
return Math.pow(StrategyPerformance.NetProfit,1.5)* StrategyPerformance.PercentProfitable/ StrategyPerformance.AvgBarsInWinningTrades;
}
Somehow in my result, a strategy with 20% more profit, got a higher score, that another even though they had the same profitability, and much shorter trades (AvgBarsInWinningTrades was 1/6)
(See Capture).

2) is there a possibility to add a keyword for % In The Market (I want to optimize for shorter time in the market, and that's why I used AvgBarsInWinningTrades - the lower the better)
Attachments
Capture Optimization results problem.PNG
(26.33 KiB) Downloaded 659 times

3strategy
Posts: 22
Joined: 31 Dec 2014
Has thanked: 2 times
Been thanked: 1 time

Re: Custom Criteria

Postby 3strategy » 30 Jan 2015

Attached is another more elaborate example of the same. T
The attachment includes:
1) An Excel with
a) the output of the optimization results (csv export saved as excel, ).
b) The excel include the custom criteria text file,
c) A column with an excel formula that I think represents correctly the fitness function, but that display results that are completely different from the results displayed in the custom criteria column.
2) png of the same optimization output.

I don't mind if the custom criteria divides all results by 1000, or by SQRT (or anything for that matter that conserves hierarchy, which results in different number that would be calculated by Excel), but in my case, the Custom Criteria seems to be incorrect.

Consequently this probably translates to bad optimization, because if the optimizer algo cannot "really" tell the good from the bad, the entire idea behind genetic or any other optimization is controverted.
Attachments
Report_2015-01-30_09-56-19.zip
(44.34 KiB) Downloaded 190 times

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Custom Criteria

Postby Henry MultiСharts » 04 Feb 2015

Hello 3strategy,

Please send us (support@multicharts.com) the following information for further analysis:
- workspace you are using;
- in QuoteManager select the symbols you are using, make a right click on it->Export data->Export instrument (with data). Send us the QMD export file for analysis;
- in PowerLanguage .NET editor->File->Export->export the studies you are using for replicating this behavior; send us the pln file;
- specify the particular value that is wrong;
- specify the value you are expecting and why.

3strategy
Posts: 22
Joined: 31 Dec 2014
Has thanked: 2 times
Been thanked: 1 time

Re: Custom Criteria  [SOLVED]

Postby 3strategy » 02 Mar 2015

I got a resolution by mail: Since my "Sample 1" custom criteria was not commented, it was used instead of my own criteria.
Changing this fixed the problem.
Many thanks.


Return to “MultiCharts .NET”