fxDreema

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

    MT4 to MT5 converting warning "conversion from 'long' to 'int'

    Questions & Answers
    2
    6
    783
    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.
    • G
      greg.pe last edited by

      Hello.

      After converting my EA from MT4 to MT5 and compiling it to MT5 got 5 warnings
      (EA works in MT4)

      "possible loss of data due to type conversion from 'long' to 'int' EAName6.mq5 lane 7087 column 16
      magic_number = ABBB::OrderMagicNumber();

      possible loss of data due to type conversion from 'long' to 'int' EAName6.mq5 lane 7737 column 28
      int ticket_oco = ABBB::StrToInteger(ABBB::StringSubstr(ABBB::OrderComment(), 5, StringLen(ABBB::OrderComment())-1));

      possible loss of data due to type conversion from 'long' to 'int' EAName6.mq5 6.mq5 lane 9964 column 11
      int M = ABBB::OrderMagicNumber();

      possible loss of data due to type conversion from 'long' to 'int' EAName6.mq5 lane 10059 column 10
      M = ABBB::OrderMagicNumber();

      possible loss of data due to type conversion from 'long' to 'int' EAName6.mq5 lane 10170 column 14
      int M = ABBB::OrderMagicNumber();

      Anyone who is able to check the code ?

      dreema7.png

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

        Some blocks need to be manually changed, could be causing this, if block says trade, change to mt5 position.

        Learn fxDreema Without the Wait!

        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

        Don’t miss out

        Click here➡️ https://mybook.to/fxDreema to get your copy today!

        Enjoy! 😊

        1 Reply Last reply Reply Quote 0
        • G
          greg.pe last edited by

          "Some blocks need to be manually changed" that's why pasted the code, hopefully to find some programmer here. Tried with Chatbot to correct this lines but effect was some other warning appear.

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

            Past the shared link, I can tell you what blocks to change.

            Learn fxDreema Without the Wait!

            My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

            The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

            Don’t miss out

            Click here➡️ https://mybook.to/fxDreema to get your copy today!

            Enjoy! 😊

            1 Reply Last reply Reply Quote 0
            • G
              greg.pe last edited by greg.pe

              All the warning lines from code are listed above

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

                Yes but that is not a shared link, to see how everything is connected, may show any problems.

                Learn fxDreema Without the Wait!

                My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                Don’t miss out

                Click here➡️ https://mybook.to/fxDreema to get your copy today!

                Enjoy! 😊

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

                Online Users

                H
                A
                E
                M
                E
                A
                E
                E
                T
                X
                A

                18
                Online

                146.8k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors