fxDreema

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

    Is it possible to have a dropdown list for inputs?

    Questions & Answers
    8
    16
    8576
    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.
    • B
      BlueMoon last edited by

      Is it possible to have a dropdown list for inputs?

      I would like the input to have a dropdown list from which I can select only one of the pre-decided value.

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

        Only native enumerations. For example, if you define some Constants with ENUM_TIMEFRAMES type, it will have this dropdown.

        M 1 Reply Last reply Reply Quote 0
        • M
          mohammad2232 @fxDreema last edited by

          @fxDreema
          CAN YOU show example ?
          I used this but not work
          input string timeframe = "ENUM_TIMEFRAMES"
          Thanks

          1 Reply Last reply Reply Quote 0
          • M
            miro1360 last edited by

            read my replies, I replied this somewhere few times 😄

            Between trading and gambling is a very small gap, be careful.

            M 1 Reply Last reply Reply Quote 0
            • M
              mohammad2232 @miro1360 last edited by

              @miro1360
              Please write link
              Thanks

              1 Reply Last reply Reply Quote 0
              • M
                miro1360 last edited by

                it were to easy for you if I made search in my replies instead of your work? 😄 😄
                try this:
                input ENUM_TIMEFRAMES timeframe = PERIOD_CURRENT

                Between trading and gambling is a very small gap, be careful.

                1 Reply Last reply Reply Quote 1
                • M
                  mohammad2232 last edited by

                  Excellent , Thanks so much
                  (you have 85 pages and no search link https://fxdreema.com/forum/user/miro1360 !! it is near impossible to find 🙂 )
                  Thanks again 🙂

                  1 Reply Last reply Reply Quote 0
                  • M
                    miro1360 last edited by miro1360

                    its like cookery book now without index 😄
                    just cook everything, one after another and you become culinary art 😉

                    Between trading and gambling is a very small gap, be careful.

                    1 Reply Last reply Reply Quote 1
                    • M
                      mohammad2232 last edited by

                      Hello again 🙂
                      Please let me know how can i use dropdown list for buy or sell money management ?
                      i find ENUM_APPLIED_VOLUME in reference but not true and can not find any other things !
                      Thanks

                      1 Reply Last reply Reply Quote 0
                      • M
                        miro1360 last edited by miro1360

                        for this I dont know simple solution without manual adding enum things into code (if drop-down is must) ...
                        but if you dont need dropdown and simple text is enough, than this:

                        create inputs and add them into each management mode:

                        0_1504962416988_upload-051b606b-dee4-4e36-9eb3-2d26002d8ec5

                        0_1504962443342_upload-6b70cd7e-ed64-4a5e-ab57-9835d6cc9f5d

                        when you are complete with each mode, add management as input:

                        0_1504962498215_upload-7f912762-992f-45a4-b6f6-627fc77f5579

                        and than these text values are names of modes which you add into expert properties manually in this order:

                        fixed
                        equity
                        balance
                        freemargin
                        block-equity
                        block-balance
                        block-freemargin
                        equityRisk
                        balanceRisk
                        freemarginRisk
                        fixedRisk
                        fixedRisk
                        1326
                        dalembert
                        fibonacci
                        labouchere
                        martingale
                        sequence

                        and you change it with typing as this in EA:
                        0_1504967007339_upload-0a6b0f24-df0d-439e-8320-5387f9ba46e9

                        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                        in case you need it as dropdown list, this is manual editing/adding in code:
                        in fxdreema this:
                        0_1504963364799_upload-240ffaaa-11fb-4afa-8769-fc49ecd011ac
                        this:
                        0_1504963892159_upload-fc84320c-76e0-4e7e-b269-c20e90a4d675

                        this in on Init section:
                        0_1504966013931_upload-07e3e6ca-0d78-41d6-ae8d-cf375e0ee43c

                        generate only mq4 (not ex4)
                        with metaeditor add this enum structure into top of code above inputs:
                        0_1504965938920_upload-28d14394-b82e-4618-ad82-0e38adbebffb

                        click compile button in metaeditor and hopefully it compile without errors, this is result:

                        0_1504966123549_upload-4ab3d676-16f1-42da-a937-6a94cbe23739

                        problem with this manual editing in metatrader code is, that each time you generate mq4 code from fxdreema, you need do all manual changes in code with metaeditor again and again 😄 - and this is why it is not very elegant

                        Between trading and gambling is a very small gap, be careful.

                        E Sauce 2 Replies Last reply Reply Quote 3
                        • M
                          mohammad2232 last edited by mohammad2232

                          @miro1360
                          Thank so much 🙂

                          1 Reply Last reply Reply Quote 0
                          • M
                            MetaTrader last edited by

                            Put the changes in an mqh file and in any custom block you can include the mqh

                            1 Reply Last reply Reply Quote 0
                            • X
                              XFullX last edited by

                              Hi,

                              Today there is no solution supported by fxdreema?
                              thanks 🙂

                              1 Reply Last reply Reply Quote 0
                              • E
                                er.arpit09 @miro1360 last edited by

                                @miro1360

                                Thanks To You .. this is working very Well

                                1 Reply Last reply Reply Quote 0
                                • Sauce
                                  Sauce @miro1360 last edited by Sauce

                                  I want to be able to have this auto-update based on chart symbol since I would like to use this EA on 28 different FX majors/crosses.

                                  Sauce 1 Reply Last reply Reply Quote 0
                                  • Sauce
                                    Sauce @Sauce last edited by

                                    Nevermind, I believe I figured it out using custom enumerations.

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

                                    Online Users

                                    K
                                    A
                                    S
                                    B
                                    A

                                    23
                                    Online

                                    146.7k
                                    Users

                                    22.4k
                                    Topics

                                    122.6k
                                    Posts

                                    Powered by NodeBB Forums | Contributors