fxDreema

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

    enum constant

    Questions & Answers
    3
    3
    345
    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.
    • S
      soroushsafizadeh last edited by

      hi guys. I want to creating drop menu for different kind of exit from trade. for this goal i used enum constant based on attached picture. when i import mql code to mt4 i cant use this EA and cant open expert properties. can you help me for solving this problem?!!
      project link: https://fxdreema.com/shared/9JKVUZFqd

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

        Just from looking at this you have the enum set up wrong:

        image.png

        Top of constants list = enum "name" {list,of,required,names} under in type = "name" "name2" and the value from the list of required names

        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
        • I
          Ipod last edited by Ipod

          This has been arnswered well in this post already. You should be able to make progress by studying that some more, simple enough when you get the hang of it.

          https://fxdreema.com/forum/topic/16167/easy-way-to-make-enum

          Looks like your constant is set wrong, your conditions are requesting 0 and 1 as identifiers so change your "exit_mode" from "fixed" to a "0" or "1".

          Also no spaces in your "exit_mode_list" make it so it is like this "{fixed,break_even,trailing_stop}

          a3afd2ff-ef20-440d-a9b8-7e371688d456-image.png

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

          Online Users

          L
          A
          G
          N
          S
          E
          S
          N
          O

          23
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors