fxDreema

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

    How to set dropdowns for inputs

    Questions & Answers
    4
    22
    1024
    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.
    • T
      tharindu999 last edited by

      I want to create dropdown menu in the input field for my EA. the EA uses two different trading models. Model 01 and model 02. User should be able to select a trading model and test the EA / Trade the EA.

      Can you guy give me a advice to how to do it?

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

        You will see how to achieve in here: https://fxdreema.com/shared/NTqgifSme

        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
        • T
          tharindu999 last edited by

          thanks for the reply brother,

          I used it this way, but there is no drawdown in the input menu 😞

          image.png
          image.png

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

            The enum value has to be at the top of the constants list.

            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! 😊

            T 1 Reply Last reply Reply Quote 1
            • T
              tharindu999 @jstap last edited by

              @jstap brother, I looked your example, it was for MT4.
              I'm asking for MT5. I'm sorry for not mentioned it earlier.

              Can you show me a example please. (MQL5)

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

                It is the same, just create exactly the same but for 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
                • T
                  tharindu999 last edited by

                  image.png
                  image.png

                  Still not works bro... why is that ?.

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

                    You'll have to add a shared link to see what's not working

                    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
                    • T
                      tharindu999 last edited by

                      https://fxdreema.com/shared/s8CFUMgLc

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

                        Without looking further, where is your enum? recreate with the same priciples as what I showed:
                        image.png

                        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
                        • T
                          tharindu999 last edited by

                          https://fxdreema.com/shared/3bLzDAAie

                          Compilation error occurs.

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

                            You are not calling and using the correct constant;

                            image.png

                            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! 😊

                            T 1 Reply Last reply Reply Quote 0
                            • T
                              tharindu999 last edited by

                              I want to create like this type of dropdown for my inputs brother.
                              image.png

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

                                That is what you have done, everything in the {curly brackets} is what you get in the dropdown.

                                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
                                • T
                                  tharindu999 last edited by

                                  A recap - :

                                  1. I created an enumeration with "enum" keyword in "constant" window / menu.
                                  2. then I entered values as {Model01,Model02}

                                  tests :

                                  I tested it, there is no dropdown in inputs of EA.

                                  I have no idea what's wrong here.

                                  1 Reply Last reply Reply Quote 0
                                  • T
                                    tharindu999 @jstap last edited by

                                    @jstap Bro... thank you... Finally, I got it... I got one last question.

                                    Should we assign value for "TM" here? is there any effect "TM" value being different from the "enum" values...?

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

                                      TM was just my name, you can call it whatever you want. The TM value is how to call your dropdown value.

                                      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
                                      • T
                                        tharindu999 last edited by

                                        No, I mentioned that the value we assign to the "TM" (or any name) always should be a value of the enumeration we created. is it?.
                                        I also curious to know the name (data type) of the "Trading_Model" (in this case) we assigned in the data type field.

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

                                          In that field (TM) you can only use one of your enum list values, but you can try to see if it's another but it will return false. By creating an enum list you create an independent type, which is needed to refer to the dropdown list value.

                                          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
                                          • T
                                            tharindu999 last edited by

                                            Thanks a lot brother... now I know how to create and use enumeration because of you... thanks a lot...

                                            B VHV-Profit-Masters 2 Replies Last reply Reply Quote 1
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            Online Users

                                            M
                                            A
                                            M
                                            W
                                            E
                                            G
                                            K
                                            E
                                            A
                                            S
                                            O
                                            S
                                            A
                                            N

                                            21
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors