fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Enumerations the input Parameters

    Questions & Answers
    2
    12
    5078
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tcanuto
      tcanuto last edited by

      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

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        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 ๐Ÿ™‚

        1 Reply Last reply Reply Quote 0
        • tcanuto
          tcanuto last edited by

          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:
          ![Problemas Insumos Timeframe.PNG](Problemas Insumos Timeframe.PNG)

          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)

          ......
          Problems Imputs Timeframe.PNG

          1 Reply Last reply Reply Quote 0
          • fxDreema
            fxDreema last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • tcanuto
              tcanuto last edited by

              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!

              1 Reply Last reply Reply Quote 0
              • tcanuto
                tcanuto last edited by

                I must do something for the H1, H4, D1, etc. appear, instead of 16385 numbers, etc.?

                1 Reply Last reply Reply Quote 0
                • fxDreema
                  fxDreema last edited by

                  I don't know. The code looks fine, if something is wrong with MetaTrader... ๐Ÿ™‚ To be hones, I don't do optimizations very often ๐Ÿ™‚

                  1 Reply Last reply Reply Quote 0
                  • tcanuto
                    tcanuto last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • fxDreema
                      fxDreema last edited by

                      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/4m79mo

                      I 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.

                      1 Reply Last reply Reply Quote 0
                      • tcanuto
                        tcanuto last edited by

                        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.

                        1 Reply Last reply Reply Quote 0
                        • fxDreema
                          fxDreema last edited by

                          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.

                          1 Reply Last reply Reply Quote 0
                          • tcanuto
                            tcanuto last edited by

                            Ok FxDreema. That's right. Now that I know the representative numbers, has no problem doing the tests.

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post

                            Online Users

                            J
                            T
                            S
                            T
                            M
                            O
                            G
                            R
                            E
                            P
                            B
                            G
                            J
                            F

                            26
                            Online

                            146.7k
                            Users

                            22.4k
                            Topics

                            122.6k
                            Posts

                            Powered by NodeBB Forums | Contributors