fxDreema

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

    What am I missing with ENUM variables for MT5?

    Questions & Answers
    8
    26
    4466
    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.
    • l'andorrà
      l'andorrà last edited by

      I created this easy EA for MT5 in which I need to select between two types of MA: simple or smoothed.

      https://fxdreema.com/shared/1m0hts8W

      I visited mql5.com's intruction pages and I found I had to create an ENUM_MA_METHOD type variable. However, when I try it here it doesn't work. No arrow is plotted no matter what method I select. Can someone please tell me what am I missing?

      (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

      (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

      (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

      jstap 1 Reply Last reply Reply Quote 0
      • jstap
        jstap @l'andorrà last edited by jstap

        @l-andorrà said in What am I missing with ENUM variables for MT5?:

        ENUM_MA_METHOD

        If you add to a constant/variable what's in this picture:

        0_1628092278724_Screenshot (525).png

        Then you get these options in inputs:

        0_1628092209055_Screenshot (524).png

        Ignore MT4, MT5 is busy optimising.

        Learn fxDreema Without the Wait!

        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

        Don’t miss out

        Click here➡️ https://mybook.to/fxDreema to get your copy today!

        Enjoy! 😊

        l'andorrà 1 Reply Last reply Reply Quote 0
        • l'andorrà
          l'andorrà @jstap last edited by

          @jstap Thank you for the info. However, can that Constant/Variable be optimized? What if I want to test all MA methods in the optimization? Shouldn't I use numbers instead as step a stop values on MT5?

          (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

          (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

          (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

          jstap S 2 Replies Last reply Reply Quote 0
          • jstap
            jstap @l'andorrà last edited by

            @l-andorrà Although this is a good question when time frames are selected using the enum method the EA can optimise all, I have never used the number method except for start/finish time but if you use this as custom code I think it would work:

            if((Ma_Method = 1) {Value = "MODE_SMA";}
            if((Ma_Method = 2) {Value = "MODE_SMMA";}
            if((Ma_Method = 3) {Value = "MODE_EMA";}
            if((Ma_Method = 4) {Value = "MODE_LWMA";}

            Learn fxDreema Without the Wait!

            My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

            The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

            Don’t miss out

            Click here➡️ https://mybook.to/fxDreema to get your copy today!

            Enjoy! 😊

            l'andorrà 2 Replies Last reply Reply Quote 3
            • S
              seb 0 @l'andorrà last edited by seb 0

              @l-andorrà
              You can optimize the SMA_MODE the first way jstap showed you.
              Set -> start value : Simple
              stop value : Linear weighted
              And the optimizer will go through all SMA_MODE. Just the optimization will be a bit messy as it isn't a quantitative parameter.

              l'andorrà 1 Reply Last reply Reply Quote 2
              • TipsyWisdom
                TipsyWisdom last edited by TipsyWisdom

                0_1628169466128_43824c08-57be-4511-9aa7-290b19596902-image.png

                as jstap pointed out, that method is 100% effective.

                the simplest approach is to use whats built into Dreema. As on the screenshot, you must select the box next to the drop down. Then when optimizing, 0=Simple, 1= Exponential, etc.

                to test for all on mt5, it would be 0 start, with 1 step, 4 end.

                l'andorrà 1 Reply Last reply Reply Quote 1
                • l'andorrà
                  l'andorrà @jstap last edited by

                  @jstap Very interesting. Should I type that custom code 'as is' in a custom code block?

                  (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                  (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

                  (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

                  1 Reply Last reply Reply Quote 0
                  • l'andorrà
                    l'andorrà @seb 0 last edited by

                    @seb-0 Thank you. And what option should be selected on the 'step' column?

                    (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                    (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

                    (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

                    1 Reply Last reply Reply Quote 0
                    • l'andorrà
                      l'andorrà @TipsyWisdom last edited by

                      @tipsywisdom Thanks for the info. That I know but I need to choose the name of the Constant. That name offered by default is too ugly.

                      (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                      (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

                      (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

                      TipsyWisdom 1 Reply Last reply Reply Quote 0
                      • l'andorrà
                        l'andorrà @jstap last edited by

                        @jstap I tried your code but I get several errors. Are you sure it is correct? I'm not a coder, sadly. 😞

                        (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                        (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

                        (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

                        bk7 jstap 2 Replies Last reply Reply Quote 0
                        • bk7
                          bk7 @l'andorrà last edited by

                          @l-andorrà

                          https://fxdreema.com/shared/zaBjNSJ2c

                          this should work

                          l'andorrà 1 Reply Last reply Reply Quote 0
                          • jstap
                            jstap @l'andorrà last edited by jstap

                            @l-andorrà I am not a coder, all self tort but I see where I went wrong though:

                            if((Ma_Method = 1) {Value = "MODE_SMA"};
                            if((Ma_Method = 2) {Value = "MODE_SMMA"};
                            if((Ma_Method = 3) {Value = "MODE_EMA"};
                            if((Ma_Method = 4) {Value = "MODE_LWMA"};
                            I put the semi colon the wrong side : )

                            You can also make the = == some code needs this, not sure what the deference is and don't think you will need.

                            Add the code like this:

                            0_1628246327605_Screenshot (528).png

                            Step by 1, start at 1 end at 2, if they are the MA's you want to test.

                            Learn fxDreema Without the Wait!

                            My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                            The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                            Don’t miss out

                            Click here➡️ https://mybook.to/fxDreema to get your copy today!

                            Enjoy! 😊

                            l'andorrà A 2 Replies Last reply Reply Quote 0
                            • TipsyWisdom
                              TipsyWisdom @l'andorrà last edited by

                              @l-andorrà said in What am I missing with ENUM variables for MT5?:

                              hahha ugly it is, but I say...if it aint broke, dont fix it.

                              1 Reply Last reply Reply Quote 0
                              • l'andorrà
                                l'andorrà @bk7 last edited by l'andorrà

                                @bk7 Thank you but I'm afraid not. I need the user to select a number that is then transformed into each Ma method.

                                (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                                (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

                                (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

                                bk7 jstap 2 Replies Last reply Reply Quote 0
                                • l'andorrà
                                  l'andorrà @jstap last edited by

                                  @jstap Thanks again but it doesn't work. No matter what value for MA_method is selected, only MODE SMA is depicted. 😞

                                  (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                                  (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

                                  (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

                                  jstap 1 Reply Last reply Reply Quote 0
                                  • bk7
                                    bk7 @l'andorrà last edited by

                                    @l-andorrà
                                    it will be transformed into the mode, you just need to put in the correct number thats why i put the comment that you can see the changes done by changing the number.

                                    1 Reply Last reply Reply Quote 0
                                    • jstap
                                      jstap @l'andorrà last edited by

                                      @l-andorrà Just change ENUM_MA_METHOD variable to a string variable have tested and works: link

                                      Learn fxDreema Without the Wait!

                                      My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                                      The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                                      Don’t miss out

                                      Click here➡️ https://mybook.to/fxDreema to get your copy today!

                                      Enjoy! 😊

                                      1 Reply Last reply Reply Quote 0
                                      • jstap
                                        jstap @l'andorrà last edited by

                                        @l-andorrà Have tested the code idea again, unfortunately this seems to have the same MA regardless of number put on input, looks like the only option you have is enum going through all. I do find sometimes code that worked on MT4 doesn't do the same on MT5.

                                        Learn fxDreema Without the Wait!

                                        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                                        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                                        Don’t miss out

                                        Click here➡️ https://mybook.to/fxDreema to get your copy today!

                                        Enjoy! 😊

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

                                          just do it the ugly way my friend. Ugly but efficient, like a 1969 El Camino. Business up front, party in the rear.

                                          0_1628365745321_263bcd7a-8705-4f78-b167-2e0b11879857-image.png

                                          l'andorrà T 2 Replies Last reply Reply Quote 1
                                          • l'andorrà
                                            l'andorrà @TipsyWisdom last edited by l'andorrà

                                            I finaly got it! Thank you very much to all for your help. 🙂

                                            (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                                            (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

                                            (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

                                            Online Users

                                            B
                                            A
                                            T
                                            M
                                            E
                                            C

                                            16
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors