Enumerations the input Parameters
-
Hello fxDreema. I believe you already know, but it's always good to say. One way that seeking time, and through the MT5 is possible.
I believe it is possible to enumerate the strategies separately placing them in imputs.
For example, where various strategies to create AE inside. In MT5 is possible to have them appear in imputs.
External Variable: Strategies - Values: Strategy 1; Strategy 2; Strategy 3; etc.
More information: http://www.mql5.com/en/docs/basis/varia ... tvariables
-
Possible, now even on MT4. Well, I still explain the basic datatypes to people, I wonder if they are able to deal with these enumerations

-
Hello fxDreema. Stirring and testing the MQL5 code, I found a way to save on external parameters. But, after I did the tests, the results do not add up, and the optimization result, the timeframes rather than appear as H1, H2, D1, etc, looks like this: 1, 2, 10, 16385 (which should be D1 ), etc., thus possibly generating false gains.
See the image below:
Here is the modified code for me. (Only the external parameters and where they are located in the code)
Must H1, D1, etc., appear in the results of optimizations H1, D1, and not in numerical values โโthat are ranging (16385)
-
Why are these values like that? 16385, 16386, 16390... these does not belong to the ENUM_TIMEFRAMES enumeration
If I am not wrong, PERIOD_D1 is 86400 or something that can be divided by 60. -
So .... the code is written as:
input string inp2="Indicator Base Buy e Sell"; input ENUM_TIMEFRAMES inp2_TIMEFRAME=PERIOD_D1; // input string inp1="Indicator Buy e Sell"; input ENUM_TIMEFRAMES inp1_TIMEFRAME=PERIOD_H1; //This optimization I made up to max D1, and no more. H1 to D1.
I do not know why this has generated number of 16385!
-
I must do something for the H1, H4, D1, etc. appear, instead of 16385 numbers, etc.?
-
I don't know. The code looks fine, if something is wrong with MetaTrader...
To be hones, I don't do optimizations very often 
-
I believe that should appear H1, H4, D1, and instead of integers, as in the case of true and false, for example.
I do optimizations always to meet the asset itself, to know which setting performs better historically at least. Operate a strategy without testing it is almost like taking a car without knowing drive. It may be that you arrive at the destination, but in most cases not.
-
I got the EA above and here is what I did:
http://prntscr.com/4m78ph
http://prntscr.com/4m792w
This is part of the code: http://prntscr.com/4m79moI also found this: http://www.mql5.com/en/forum/14406
I don't know why on my side it shows values like 1, 2, 3. It seems that for example PERIOD_H1 equals to 16385
Also look at the function on the top here: http://www.mql5.com/en/articles/81 It shows the values of all "PERIOD" constants.
-
So ... it seems to me you have to migrate from MQL4 to MQL5 to appear H1, H4, etc. So the values โโare right, but at the time of testing visual, it will automatically test the current timeframe, not the timeframe of the result.
But thanks for the info, as for now I can provisar changing the parameters of manually timeframe for the visual test.
I'm waiting to change the test for H1, H2, H4, etc., because then I can do the visual tests automatically with the correct file generated set.
-
Ok, I will say it again - I don't hold the key for this problem, this is MetaTrader problem, not fxDreema problem. You have the code, you can see that the input parameter is defined as it should. The EA does not have more control than that.
That "Migrating from MQL4 to MQL5" topic is more than 4 years old! It came out when they launched MT5.
I think the backtests are done properly, the only problem is that the time does not appear in a human readable format. Well, after all, there is no such thing as H1, D1 and so on... for the program everything is numbers, and for example 16385 represents H1.
-
Ok FxDreema. That's right. Now that I know the representative numbers, has no problem doing the tests.