fxDreema

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

    Compilation errors

    Bug Reports
    2
    20
    4289
    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.
    • tcanuto
      tcanuto last edited by

      Hello fxDreema. I'm having a problem to compile this my new project: https://fxdreema.com/shared/CByOLORKc

      To find out, I'm building a strategy based on Donchian Channel indicator. If you want to verify that is correct, please do so.

      ......
      donchian_channels.mq5

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

        I think there is some bug when working with those ckeckboxes for input parameters. In the code it looks that "Extremes" is checked, but it's not in the block...

        Nevermind, because this parameter is "weird". Sometimes they define something like custom data types inside custom indicators (also in EAs, in any MQL5 code), and this is what happens with that particular indicator. "Applied_Extrem" is not a valid datatype from the EA standpoint, also there is no constant HIGH_LOW defined in it. These are defined inside the indicator, but the EA does not care. The EA can only read indicator buffers, nothing more from the code of the indicator. Well, HIGH_LOW is some numeric value for sure, so you can use that value instead HIGH_LOW. And use "int" datatype instead of "Applied_Extrem". Somewhere on the top of the .mq5 file of this indicator you should find information about "Applied_Extrem"

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

          I saw the code, and from what I understand, this enumeration.

          //+-----------------------------------+
          //|  Enumeration declaration          |
          //+-----------------------------------+
          enum Applied_Extrem //Type of extreme points
            {
             HIGH_LOW,
             HIGH_LOW_OPEN,
             HIGH_LOW_CLOSE,
             OPEN_HIGH_LOW,
             CLOSE_HIGH_LOW
            };
          

          And now, what do I do?

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

            HIGH_LOW equals to 0, HIGH_LOW_OPEN is 1, then 2, 3 and 4. But the EA can't see and use these constants. The same can be defined in the EA, but this is another story. Just define that parameter as "int" and give it values between 0 and 4.

            Here is more about Enumerations: http://docs.mql4.com/basis/types/integer/enumeration

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

              I did what you told me, but I continue with compilation errors.

              https://fxdreema.com/shared/FuNkkrD5e

              ![Compilação errors.PNG](Compilação errors.PNG)

              ......
              Compilation errors.PNG

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

                Look parameters in Buy now and Sell now blocks

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

                  Ok Thank you. FxDreema. I see now that was my fault. Now I can generate the EA. But I'm having trouble running the strategy. I tried some ways, but could not.

                  I'll be creating a new post for this project.

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

                    So you are having troubles working with fxDreema. Do you have some ideas and recommendations of how some things can be done? Things that does not exists already?

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

                      __HIGH_LOW equals to 0, HIGH_LOW_OPEN is 1, then 2, 3 and 4. But the EA can't see and use these constants. The same can be defined in the EA, but this is another story. Just define that parameter as "int" and give it values between 0 and 4.

                      [/quote:3iv2ab69]
                      How can I define in the EA? Managed to put these constants in external imput and how I do in code?
                      https://fxdreema.com/shared/MR01O6Hyc

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

                        http://prntscr.com/7d8vrt

                        Just use int values from 0 to 4 for the input called Extremes

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

                          Yes. Put the enum Applied_Extern, and it worked.

                          But I don't know why also appears in visual test the HIGH_LOW enum.

                          See the code

                          ......
                          TCF DC MM v1.3.mq5

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

                            https://fxdreema.com/shared/RDHu1LKdd
                            This is the result (that red line): http://prntscr.com/7dmv6j

                            If you want to use this enum, it's fine to put it into the EA as you did. Then you can also use the same data type for the indicator that is added in fxDreema - not int, but Applied_Extern. Now you have it with int: http://prntscr.com/7dmvvz

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

                              The Applied_Extern worked on the visual test, but to optimize don't. What is the problem?

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

                                Is it this or it's something else... because some things are disabled when optimizing, like working with objects or timer events. This is one of the things where I can't say what is the problem and as I can only guess, then I think that TeamViewer can make things faster 🙂

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

                                  Hello friend. I'd like to, but as I don't speak English, but with a translator will be hard to our communication.

                                  You could check in the code in which posted?

                                  I'll be very grateful for that.

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

                                    I think that it works for me.

                                    This is how it looks when backtesting
                                    http://prntscr.com/7fd3s1

                                    This is for Visual backtest (it's too slow for me to wait for all trades, to here is the first one only)
                                    http://prntscr.com/7fd4bg

                                    And when optimizing
                                    http://prntscr.com/7fd239
                                    http://prntscr.com/7fd28c
                                    http://prntscr.com/7fd2cx
                                    http://prntscr.com/7fd2j5

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

                                      You saw that in Visual Test he's still like 2 lines. How do I fix it? I want you to stay with only the currently selected Applied_Extern.

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

                                        Most of the time I don't know what you are asking me. Here is a little tool that does amazing things: https://app.prntscr.com/en/index.html

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

                                          Cool this site. I will be giving a sneak peak.

                                          Here's the image:
                                          2 Lines.PNG

                                          I see the 2 lines is actually a shift, I don't know why that. Not working Applied_Extern features.

                                          ......
                                          2 Lines.PNG

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

                                          Online Users

                                          R
                                          A
                                          E

                                          10
                                          Online

                                          146.7k
                                          Users

                                          22.4k
                                          Topics

                                          122.6k
                                          Posts

                                          Powered by NodeBB Forums | Contributors