Optimize the optimzer process

Moderator: admin

Optimize the optimzer process

Postby lavolpe » Wed Nov 14, 2018 7:42 am

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
lavolpe
 
Posts: 11
Joined: Tue Nov 13, 2018 1:36 pm

Re: Optimize the optimzer process

Postby Apprentice » Thu Nov 15, 2018 2:39 pm

In optimizer, for the second parameter, select only yes.
Hence NO contingencies will NOT be considered then.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Optimize the optimzer process

Postby lavolpe » Fri Nov 16, 2018 4:50 am

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.
lavolpe
 
Posts: 11
Joined: Tue Nov 13, 2018 1:36 pm


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 11 guests