Optimizer accepts only integers as input.

Questions about MultiCharts and user contributed studies.
kiasom
Posts: 32
Joined: 30 Jun 2010
Has thanked: 49 times
Been thanked: 3 times

Optimizer accepts only integers as input.

Postby kiasom » 06 Jun 2011

Holidays = time for optimization J
I'm on MC7 beta 4, but the optimizer refuses to work as in previous versions. After a lot of head-scratching I found that the optimizer doesn't accept any decimal inputs. Actually, in the list of variables to optimize, it transforms inputs with decimals to integers, so 5.9 will become 59 etc.

It looks like a bug, but maybe it's a new feature? )

rainworm
Posts: 11
Joined: 19 Apr 2011
Has thanked: 3 times
Been thanked: 5 times

Re: Optimizer accepts only integers as input.

Postby rainworm » 07 Jun 2011

I experience the same behaviour. It works for me by typing 5,9 (instead of 5.9). Everytime you modify and recompile your study (parameters) the inputs are resetted to 59. I'm using a german version of Windows and the decimal seperator here is a , (comma). That's only in the optimizer dialogs, all other dialogs of MC request a . (point).

User avatar
Stan Bokov
Posts: 963
Joined: 18 Dec 2009
Has thanked: 367 times
Been thanked: 302 times

Re: Optimizer accepts only integers as input.

Postby Stan Bokov » 08 Jun 2011

All input dialogs for optimization use regional settings for the decimal separator. If in your regional Windows settings a comma is used, you should use a comma - ",". If a period is used, you should use a period - ".".

kiasom
Posts: 32
Joined: 30 Jun 2010
Has thanked: 49 times
Been thanked: 3 times

Re: Optimizer accepts only integers as input.

Postby kiasom » 08 Jun 2011

All input dialogs for optimization use regional settings for the decimal separator. If in your regional Windows settings a comma is used, you should use a comma - ",". If a period is used, you should use a period - ".".
OK, but how can I use doubles with comma for the decimal separator in Easy Language??? Don't tell me the code will compile only if I change my regional settings. J

So, we have to use the dot for decimal separator. The Input list shows them with decimal points as they should when we format them while running/backtesting in MC.
The very same inputs that then can not be used in the optimizer.

Now, it's pretty easy to solve this issue when you know about it: Just use inputs without decimals and then postmultiply them inside your EL code with the necessary factor.

User avatar
Stan Bokov
Posts: 963
Joined: 18 Dec 2009
Has thanked: 367 times
Been thanked: 302 times

Re: Optimizer accepts only integers as input.

Postby Stan Bokov » 09 Jun 2011

I've attached two screenshots, hopefully they clarify where you should use dots and where you should use your regional settings.
Attachments
Regional_settings_2.png
Regional_settings_2.png (125.83 KiB) Viewed 622 times
Regional_settings_1.png
Regional_settings_1.png (124.4 KiB) Viewed 620 times

kiasom
Posts: 32
Joined: 30 Jun 2010
Has thanked: 49 times
Been thanked: 3 times

Re: Optimizer accepts only integers as input.

Postby kiasom » 10 Jun 2011

I think it's contra-intuitive to ever use the comma as decimal separator, since in EasyLanguage only the dot is accepted. And why should the optimizer behave differently in its handling of inputs than when formatting the very same inputs of the signal in MC?
For less confusion, I suggest to revert to the previous order where only dots are used as separator.

User avatar
Stan Bokov
Posts: 963
Joined: 18 Dec 2009
Has thanked: 367 times
Been thanked: 302 times

Re: Optimizer accepts only integers as input.

Postby Stan Bokov » 10 Jun 2011

I think it's contra-intuitive to ever use the comma as decimal separator, since in EasyLanguage only the dot is accepted. And why should the optimizer behave differently in its handling of inputs than when formatting the very same inputs of the signal in MC?
For less confusion, I suggest to revert to the previous order where only dots are used as separator.
I personally agree with you. It's always counter-intuitive for me to use anything other than a dot. But, the program designers needed it this way for some reason. You can make your suggestion in the PM.


Return to “MultiCharts”