fxDreema

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

    How to use enum

    Questions & Answers
    2
    4
    2344
    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.
    • J
      jxlibin1987 last edited by

      If you use the enum parameter? For example, I appear in the parameter options to buy and sell. Similar bool can choose the true and false

      ......
      2@SBCS6FB_373_1(AR{_2YU.png

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

        I made it manually into code 😉
        instead of enum you can use numeric values like 0,1,15,... - depends on how they are used in code

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

        1 Reply Last reply Reply Quote 0
        • J
          jxlibin1987 last edited by

          How to write by hand, give an example of

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

            1. first you make your EA in fxdreema with this way:
              in constants define one that can be in future changed to your enum, so you define constant:
              int MYmode = 0

            2. and now you continue in creating blocks - you can with Condition compare logic:
              if(MYmode==0)
              //if true - orange output pass, if false yellow output pass

            3. next Condition compare next logic:
              if(MYmode==1)
              //if true - orange output pass, if false yellow output pass

            if(MYmode==2)
            ...
            etc. ...

            1. you generate mq code with fxdreema, after this open your code with MetaEditor and do this:
              you write in code your enum structure, need write it in top level - in place where is #property, or functions (not inside functions):

            enum ENUM_MY_MODE
            {
            CCI,
            RSI,
            Stoch
            };

            1. you delete your old constant-input which was defined in fxdreema "int MYmode = 0", - replace this constant-input with type of your enum:

            input ENUM_MY_MODE MYmode=CCI;

            1. compile this with MetaEditor into your working EA and have fun 😉

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

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

            Online Users

            S
            O
            K

            16
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors