fxDreema

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

    cannot convert enum

    Questions & Answers
    2
    10
    3014
    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.
    • H
      holygrailfx last edited by

      error.JPG

      when trying to set the current timeframe to a offlinechart, it suddenly creates a error message
      in an another EA it just worked fine

      any ideas?

      ......
      error.JPG

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

        Sorry, I made many changes yesterday and there can be some issues. It should work now. By the way you can use this as a data type for this constant - ENUM_TIMEFRAMES

        1 Reply Last reply Reply Quote 0
        • H
          holygrailfx last edited by

          okay
          thanks

          but it is still acting weird
          I went back to a old version, before the compiling issues yesterday
          so when I load the older version into the metaeditor and compile, no errors

          but when I load the old version into fxdreema, resave as mq4 and recompile in metaediotr
          it compiles but it has a 7 warnings, while just before it had none

          while you are probably just going to say it are just warnings, they were not there before so I finf it disconcernting

          errors.JPG

          ......
          errors.JPG

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

            It looks that there are more warnings than before, but in fact they are less. I just enables strict mode (#property strict) and I spent a day to clear warnings here and there, but probably some of them are still there. I forgot to check purple blocks (on Trade, on Chart...), it's probably because of them, but again - those warnings only appear because I enabled strict mode and the code that produces them is actually unchanged.

            Strict mode is something that allows MetaEditor to print more warnings and errors and to be more strict about the coding rules.

            1 Reply Last reply Reply Quote 0
            • H
              holygrailfx last edited by

              Okay
              but the same EA - old version prints the comment message on the screen correctly
              when I use the old EA but recompiled with new fxdreem, either the message does not show at all!
              or it shows but it gives faulty values
              for example 99.9999999998 instead of 100

              very confusing

              1 Reply Last reply Reply Quote 0
              • H
                holygrailfx last edited by

                to illustrate my previous point
                weirdcomments.jpg

                another error message, it did compile but shows in teh tab when EA is running, or actually as such not running, this was why the commenst did not show up
                array.jpg

                which refers to a line of code
                arrayouitofrange1720.jpg

                which is teh block used to select trades, organized by least or most profitable
                when i trun it off the EA runs, but comments shwo up wierded out

                thanks

                ......
                weirdcomments.jpg
                array.jpg
                arrayouitofrange1720.jpg

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

                  I think that it works now.

                  Looking at those long numbers, tell me if one of them comes from some block and what it represents... I mean, if you get the value directly from somewhere, but not if you do some mathematics somewhere. I want to normalize those numbers where I can. I can't help much when +,-,* or / is used somewhere and in this case I can suggest NormalizeDouble().

                  1 Reply Last reply Reply Quote 0
                  • H
                    holygrailfx last edited by

                    The case for the long numbers, for example renkosize which is represented as 99.999999.... should be exactlty 100
                    Before with the same calculation that was exactly the case, with renko size is fixed so no deviation possible

                    Before you updated on Monday the same EA gave me 100 as a result
                    That is what I am referring to the fact that the same EA, when compiled before monday gave the result 100 fopr RenkSize and when compiling after monday gives the result 99.99999999
                    Of course it is not far off, but it lets me fear that other number are slightly off as well. and forex is an exact game, it is not a big difference but a difference all the same

                    1 Reply Last reply Reply Quote 0
                    • H
                      holygrailfx last edited by

                      another remark
                      the 0.370000002 refers to total lotszie of open sell orders
                      the fact that it adds 000002 on the back is just weird, that size does not even exist nor is accepted by the mt4 terminal

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

                        What I did in Mondey is for good, it was only something that reveals small mistakes. The calculation is still the same, but now it shows the real number. I know it sounds stupid, but I also had many problems with values that look like 10 but are in fact like 9.9999999999991. I can't explain why this happens, it's something technical with floating numbers in C++. Check this: http://stackoverflow.com/questions/2909 ... -precision
                        In other words, in the past you saw rounded but false numbers and now you are looking at their real value.

                        That's why they provide NormalizeDouble(). Now I want to normalize the data that can be get from Condition, but it's not as simple as to write NormalizeDouble everywhere, because this function has second parameter for the number of digits after the point and this depends of what kind the value is. If it's lot size, then 2 digits, in case of price - 2, 3, 4 or 5 digits depending on the market. If it's the value of custom indicator... absolutely depends.

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

                        Online Users

                        C
                        H

                        6
                        Online

                        146.8k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors