Page 1 of 1

Optimize the optimzer process

PostPosted: Wed Nov 14, 2018 7:42 am
by lavolpe
Hi, i would like to know if there is a way for reduce combinations numbers!
For example... I have two parameters where the second depends on the first value:


strategy.parameters:addString("usema", "Use EMA indicator", "", "YES");
strategy.parameters:addStringAlternative("usema", "YES", "", "YES");
strategy.parameters:addStringAlternative("usema", "NO", "", "NO");

strategy.parameters:addString("closeema", "Close position when EMA is over", "", "YES");
strategy.parameters:addStringAlternative("usema", "YES", "", "YES");
strategy.parameters:addStringAlternative("usema", "NO", "", "NO");


In this situation i have 3 combinations, not 4. Where first is NO and second is YES have no sense (the same result of NO NO because I do not consider the second option in the strategy if the first is NO).

A trick is to exit from ExtUpdate function when i want to exclude a particular combination, but this still returns a result (0 value) and I think this affects the optimizer in the choice of conbinations to be processed.

any other ways?

thanks

Re: Optimize the optimzer process

PostPosted: Thu Nov 15, 2018 2:39 pm
by Apprentice
In optimizer, for the second parameter, select only yes.
Hence NO contingencies will NOT be considered then.

Re: Optimize the optimzer process

PostPosted: Fri Nov 16, 2018 4:50 am
by lavolpe
Apprentice wrote:In optimizer, for the second parameter, select only yes.
Hence NO contingencies will NOT be considered then.


Yes absolutely right, but i can't do that when second parameter is integer, or when i have multiple connected parameter.

I'm only looking for a way to inform optimizer to not consider some combinations, that is different to have a 0 value.