fxDreema

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

    Lack of support to "enum" datatype

    Questions & Answers
    2
    6
    4625
    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.
    • Y
      ylidor last edited by

      FxDreema doesn't support enum datatypes. Some great coders, such as Mladen, are using enum frequently for Price type. Even when I imported one of his "mq4" indicators that has enum Price type I could not use it as costume indicator in FxDreema because of this datatype. Importation of one of his "ex4" indicator ended up the same. When I tried to use "int" with the default value of the enum (which was "close"), I got errors message on this "close" during compilation.

      Are there any new ideas how to tackle this deficiency?

      Thanks Ron

      1 Reply Last reply Reply Quote 0
      • Y
        ylidor last edited by ylidor

        And to be more specific:

        These are the input parameters of the custom indicator "ocn_nma_3_1.ex4"

        0_1499662983028_Custom indicator ocn_nma_3_1.jpg

        "Price to use" is enumaration data type

        0_1499663173920_Price to use is enumaration.jpg

        I used "enum" as data type

        0_1499663323032_Using enum as data type.jpg

        The enum list was casted here in the EA

        0_1499663373271_Casting enum list here.jpg

        This is how the enum appeared in the iCustom

        0_1499663461391_This is how how the enum appears in the iCustom.jpg

        And these are the results of the compilation

        0_1499663538601_And these are the results of the compilation.jpg

        Can this be resolved? The indicator is attached as it's available on public domain (coded by Mladen - thanks!)

        0_1499663853086_ocn_nma_3_1.ex4

        1 Reply Last reply Reply Quote 0
        • Y
          ylidor last edited by

          So if I import the indicator exactly as it appears in the Input parameters, as follows

          0_1499665552852_If we change the enum to int as done here.jpg

          The default value is not liked by the EA, as seen here

          0_1499665635159_The Close integer is not recognized.jpg

          And confirmed by the compilation results

          0_1499665679548_As also seen in this compilation.jpg

          Is there any other way to import successfully an enumaration value?

          1 Reply Last reply Reply Quote 0
          • Y
            ylidor last edited by

            Well after playing around I found how to use enumeration in FxDreema EA. Inserting the list here in the following format does the trick:

            0_1499678603246_The correct way to insert enum list into FxDreema EA.jpg

            Then you have to manually change the enum value at all the icustom lines, as follows:

            0_1499678684532_But you have to manually change the enum value at all the icustom lines.jpg

            And then it compiles with no issues

            0_1499678775204_Compilation with no errors.jpg

            bossx 1 Reply Last reply Reply Quote 0
            • bossx
              bossx @ylidor last edited by

              @ylidor what is the code for this indicator?

              1 Reply Last reply Reply Quote 0
              • Y
                ylidor last edited by

                Bossx, Sorry for being so late (2 months late) to reply. I don't understand your question. The indicator is attached above and the code is unavailable since it is an ex4 file. This topic deals with setting up correctly the enum type of parameters in indicators for which the code is unknown.

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

                Online Users

                J
                E
                T
                E
                B
                A

                16
                Online

                146.6k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors