Hi Guys,
I am using enum values for my Input parameters and it seeme there is a bug because I am getting nice results while optimizing.
But when I try to use optimization results for testing (no method changed) the result is absolutely different.
Its looks that its made by enum parameters because optimizing using enum differently than testing.
Tom
Strange. Can't say I've ever seen a problem with input enums, and I use them pretty much constantly. The only way we could really help you verify is if you post up your code mate.
Cheers
Hi Tom
Strange. Can't say I've ever seen a problem with input enums, and I use them pretty much constantly. The only way we could really help you verify is if you post up your code mate.
Cheers
Thanks for fast response.
The problem is between optimization and testing (MT4). I had never different result of optimization and visual mode of one reults. The problems started when I used enum.
Optimization and used settings:
Used settings have no same results as in opitmization.
Settings:
I am using this in code:
enum eDay{ Dx=-1, // Not set D0=0, // Sunday D1=1, // Monday D2=2, // Tuesday D3=3, // Wednesday D4=4, // Thursday D5=5, // Friday }; extern eDay ECR_DisableDay = Dx; //Function for program and other int parameters / excluded day function (enum to int) int eDayToInt(eDay fDay){ if(fDay==D0){ return(0); }else if(fDay==D1){ return(1); }else if(fDay==D2){ return(2); }else if(fDay==D3){ return(3); }else if(fDay==D4){ return(4); }else if(fDay==D5){ return(5); }else{ return(-1); } }
But I am worried about the same type of working in optimization and in testing.
Or it could be caused by lenght of settings string? When I right click on Set Input Parameters (at selection optimization results) does all parameters are copied to input form? Because when I click Copy and then pasting them to notepad, they are cutted after 964 chars.
Copying input parameters (are cutted):
Hi all,
it looks that problems are caused by small caps in the name of ENUM parameter and its values names.
I make this and now its the same in optimization and testing:
enum ENUM_DAY{ D0=0, // Sunday D1=1, // Monday D2=2, // Tuesday D3=3, // Wednesday D4=4, // Thursday D5=5, // Friday DX=-1, // Disabled };
Hi all,
it looks that problems are caused by small caps in the name of ENUM parameter and its values names.
I make this and now its the same in optimization and testing:
Even stranger Tom. I use mixed caps in ENUM without problems. But as long as your problem is solved... :)
![](https://c.mql5.com/3/87/wink.gif)
Hi Guys,
I am using enum values for my Input parameters and it seeme there is a bug because I am getting nice results while optimizing.
But when I try to use optimization results for testing (no method changed) the result is absolutely different.
Its looks that its made by enum parameters because optimizing using enum differently than testing.
Tom
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi Guys,
I am using enum values for my Input parameters and it seeme there is a bug because I am getting nice results while optimizing.
But when I try to use optimization results for testing (no method changed) the result is absolutely different.
Its looks that its made by enum parameters because optimizing using enum differently than testing.
Tom