fxDreema

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

    Feature Request: MT5-MT4 Project Converter

    Questions & Answers
    2
    8
    2029
    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.
    • T
      Trader3487 last edited by

      I developed a large ea in mt5 that opens only 1 trade at a time and now I want to test it in mt4. The ea has hundreds of blocks and many variables. If I manually enter the variables and copy/paste the blocks it's still a tremendous amount of work because the variable placements within the blocks get messed up when copied over. It would be great if there was an easier way to translate mt5 projects to mt4 and vice-versa.

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

        Damn, this requires database changes 🙂

        1 Reply Last reply Reply Quote 0
        • T
          Trader3487 last edited by

          oh well, it's not urgent so I guess I'll manage using copy/paste for now

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

            So, Variables (and Constants) are associated by some ID number that is not visible. This is because initially I wanted to be able to rename them without affecting the data that is written in blocks. If some block is using a Variable with ID = 3, then you can give that Variable any display name, but the ID will remain the same. And this works inside the same project, but when you copy that block that has Variable with ID = 3 inside, then it depends what Variable holds that ID in the other project. I'm not sure, but I think that when I created those Constants and Variables it was not possible to copy/paste blocks between projects, so I was not thinking about this.

            There is some way to transfer whole project from MQL5 to MQL4 that is a little bit tricky and will also need to check what is missing (some blocks have different ID in MQL4 and MQL5, something that also needs to be fixed). Download .xml file, open that file with notepad and find <codelanguage>MQL5</codelanguage> near the beginning of the content. Rename MQL5 to MQL4, save that file and load it into fxDreema again.

            1 Reply Last reply Reply Quote 0
            • T
              Trader3487 last edited by

              it shows me error message about "this project uses block that was abandoned..." but other than that I don't see anything else missing. So it looks like it's actually working! 🙂

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

                Well, some blocks are... long story, just replace them 🙂

                1 Reply Last reply Reply Quote 0
                • T
                  Trader3487 last edited by

                  ok is it possible that I'm not using those missing blocks in this project? because it looks like everything is there

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

                    I looks that it's there, but it's probably not.
                    In the beginning I started to add blocks to MT4 and to MT5 separatedly, and I was using different ID names for some blocks sometimes. For example NoTrades vs NoPositions. But I had no idea to allow mixing MT4 and MT5 blocks, back then there was no even copy-paste. Now I'm still not 100% into that idea, to mix MT4 and MT5 blocks. I suggest to remove those blocks that are missing and replace them. And also check conditions if something is used in MT5 that is not available in MT4.

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

                    Online Users

                    L
                    S
                    A
                    F

                    10
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors