Feature Request: MT5-MT4 Project Converter
-
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.
-
Damn, this requires database changes

-
oh well, it's not urgent so I guess I'll manage using copy/paste for now
-
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.
-
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!

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

-
ok is it possible that I'm not using those missing blocks in this project? because it looks like everything is there
-
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.