fxDreema

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

    Undeclared Identifier EA Wont Compile

    Bug Reports
    3
    4
    5774
    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.
    • K
      kriordan last edited by

      The indicator compiles in mt5

      https://www.mql5.com/en/code/1352

      but the test EA will not

      0_1638938242311_20211203 i_klprice Test (1).mq5

      Could you please help me out with this one - been trying to solve it for over a week

      Kerry

      TipsyWisdom 1 Reply Last reply Reply Quote 0
      • TipsyWisdom
        TipsyWisdom @kriordan last edited by

        @kriordan said in Undeclared Identifier EA Wont Compile:

        The indicator compiles in mt5

        https://www.mql5.com/en/code/1352

        but the test EA will not

        0_1638938242311_20211203 i_klprice Test (1).mq5

        Could you please help me out with this one - been trying to solve it for over a week

        The indi compiling has nothing to do with the EA in regards to a problem you may be having. but please provide screenshots of whats failing where to help troubleshoot. and detail the steps youve done

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

          The problem is in that there is no constant with name MODE_JJMA defined. Looking at the code, this constant comes from enumeration called Smooth_Method. But this enumeration is defined in another file - smoothalgorythm.mqh. This file is of course not read from the EA builder and it didn't know what this enumeration is.

          What's about these enumerations? They are used to make such custom data types, you see what the result is in the Inputs of the indicator, you have nice select menus there. But when the indicator uses its own enumerations, because they are custom data types, the EA doesn't know about them. The EA knows what double, int, string, bool is, there are even some pre-built enumerations that can be accessed from both, the indicator and the EA. But when the indicator uses its own custom enumeration, this same enumeration must be copied into the EA so the EA knows what it means. Or at least I don't know how the EA can "see" these custom enumerations in the Indicator. So when you add a new indicator in fxDreema, it tries to read the enumerations. This indicator uses two enumerations, however one of them is imported from another file. It's actually written in the indicator itself, but it is commented.

          I added this enumeration to your indicator. Hopefully it will work now.

          K 1 Reply Last reply Reply Quote 0
          • K
            kriordan @fxDreema last edited by

            @fxdreema

            Thanks for your response and the test EA now compiles

            The author of the indicator has many others that use external files so will try to modify these as you have done

            Kerry

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

            Online Users

            N
            J
            A
            Z

            21
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors