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? )
Optimizer accepts only integers as input.
Re: Optimizer accepts only integers as input.
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).
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Optimizer accepts only integers as input.
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 - ".".
Re: Optimizer accepts only integers as input.
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. JAll 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 - ".".
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.
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Optimizer accepts only integers as input.
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
- (125.83 KiB) Downloaded 637 times
-
- Regional_settings_1.png
- (124.4 KiB) Downloaded 635 times
Re: Optimizer accepts only integers as input.
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.
For less confusion, I suggest to revert to the previous order where only dots are used as separator.
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Optimizer accepts only integers as input.
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.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.