EA Builders

MetaTrader Build 600 Released. Big MQL Changes that Make MT4 More Like MT5

MetaTrader Build 600 has been Released

Please see the bottom of this post for the latest updates.

On February 4th, MetaQuotes released build 600. This is a major update of MetaTrader 4.

Some brokers will push the update to you when you connect. You should contact your broker to find out when you will get the update.

Build 600 is a major change to the MQL4 language. Basically, MetaQuotes has taking all of the features of MT5 and forced them into MT4.

The MT5 features are nice. But the problem is that build 600 is not 100% backward compatible. This means after the update to build 600, some of your Expert Advisors will not build.

Visual Traders Studio (VTS) has been updated to work with build 600.

The VTS version that supports build 600 is 4.0.0.61.

(Here are VTS update instructions: http://expert-advisor-builder.com/faq/how-do-i-update-vts/)

VTS converts your drawings into MQL code, and then uses the MetaTrader compiler to build the MQL code into an Expert Advisor.

The MetaTrader compiler prior to build 600 was “metalang.exe“. The new compiler introduced with build 600 is “mql.exe“.

The latest release of VTS (4.0.0.61) allows you to select the new compiler as “mql.exe”.  There were also a few other changes made to the generated MQL code in this release.

When you build your system from within VTS, if VTS can not find “metalang.exe” it will automatically look for “mql.exe” and will continue building.

If “mql.exe” can not be found, you’ll need to manually set the compiler. This is done from the VTS Main menu:

Tools->Options->MultiPlatform

This is the MultiPlatform window:

 

Clicking the “Add” button will open a file selection dialog. Navigate to the location of your MetaTrader platform and select the file “mql.exe”.

There is still support for the “metalang.exe” compiler for VTS users that do not upgrade to MetaTrader build 600.

Also, on the file selection dialog , the bottom right pull-down menu offers a file filter. This makes it easier to locate the correct file for selection. The filter supports “metalang.exe”, “mql.exe”, and “mql64.exe”.  In addition, the filter can be set to “*.exe”, which allows selecting any executable file – in case MetaQuotes changes the name of the compiler again!

Select MetaTrader Compiler as mql5.exe or metalang.exe

Select MetaTrader Compiler as mql5.exe or metalang.exe

 

NOTE: With the new “mql.exe” compiler you will see many more warnings. Remember, warnings do not prevent an EA from building.  (Errors will prevent an EA from building.)

VTS Will Continue to be Updated to Support MetaTrader Updates

We fully expect additional issues to arise. We are currently running 100% regression tests on all code paths (including all plug-ins). We anticipate a few more VTS updates over the next few weeks. We’ll post update information here.

Thanks for using VTS. This situation is one of the best reasons to use VTS.  As a trader, you want to focus on trading and system building – not on syntax errors and compilers! You focus on your drawings, and we’ll focus on converting those drawings to whatever programming language is needed to automate your system.

Here is a link to the MetaQuotes release notes for technical information on the update: http://forum.mql4.com/60555

Here are some other links that may have helpful info:

Latest Updates

Monday, February 10, 2014

We  released VTS version 4.0.0.62 to address a few more Build 600 issues.

This new release addresses the issues below:

  • fix fibo default parameters
  • copy EA to MQL4 folder
  • changes to grid code to support mql5
  • save candlestick parms with different container names
  • catch exception when dropping into treeview in toolbox

Tuesday, February 11, 2014

MetaQuotes continues to release new builds (up to build 604). We continue to monitor the changes  and will make updates to VTS as we become aware of any issues.

These are the outstanding issues we have that will be included in the next VTS release (4.0.0.63)

  • The ex4 file for EAs is not being copied to the new Build 600 folder “MQL4\Experts” (only the mq4 file is being copied)
  • Scripts are not being copied to the new Build 600 folder “MQL4\Scripts”
  • All strings are now UNICODE, so some “message box” information is garbled.
  • There problems finding the standard include files.

Feel free to post any issues you are seen here, or send us an email at support@iExpertAdvisor.com

Remember, the bottom line is that we’ll continue to update VTS so that your systems build correct Expert Advisors for both pre-Build 600 and post-Build 600 MT platforms.

 

Expert Advisor Files Not in Correct Location

 This issue will be addressed in the next build.  In the mean time here is a work around. 

The mql file is being copied to the new build 604 directory. Which is “MQL4\Experts”
This was added to VTS version 4.0.0.62
VTS should also copy the EX4 file.  It currently does not, we’ll add this to the next build.
 
In the mean time:
After building your system in VTS,  open the MetaEditor and press F7 to compile the system. It will then appear in the MetaTrader platform.  As a last resort you can close the MetaTrader platform and re-open it.  This will cause the EA to appear as well.

Include Files Missing (stdlib.mqh, etc)

The include folder for pre-Build 600 was “experts\include”.  For post build-600, the folder is “MQL4\Include”.

These are MQL source code files that are “included” into the main MQL file. (Include, header files,  usually contain function prototypes and definitions).

VTS-generated MQL files reference some include files and expect them to be either in the “include” folder, or the current folder.

These files are most likely on your PC in the pre-Build 600 include folder. Something like:

C:\Program Files (x86)\MetaTrader 4\experts\include

They should be copied to the new folder, which is something like:

C:\Program Files (x86)\MetaTrader 4\MQL4\Experts

If you get an error about a missing include file, copy the file to the new “includes” folder (“MQL4\Include”).

I’ve attached the files here in a ZIP file.

mql_includes

VTS Release 4.0.0.63

We just released a new version of VTS to address the remaining build-600 issues.

Note: All of these changes are backward compatible, so you should be able to switch back and forth between pre-Build 600 and post-Build 600 MT builds without any worries.

VTS copies EAs, scripts, and in the case of the ea-indicator plug-in, indicators to the normal MetaTrader “experts” folder, and checks if the “MQL4\Experts” folder exists, and if so, copies the files to that folder as well.

The Custom indicators that you see in the Functions ToolBox are always sourced from the new folder “MQL\Indicators”, if the folder exists.  If you change the MetaTrader platform used by VTS by going to Tools->Options->MultiPlatform, you can right click on the  Custom indicators menu in the Functions ToolBox to refresh the list.

NOTE: If you have updated to MT Build 600, it’s important to source your custom indicators from the  ”MQL\Indicators” folder because this is where MT looks for the indicator when the EA is running. If the custom indicator only exists in the pre-build 600 folder, it will not be loaded and found when the EA is running.  The build-600 update copies all of your  EAs, scripts, and custom indicators to the new folders.  VTS insures that you are getting the custom indicators from the correct location.

Although VTS copies all of the EA files to all of the correct locations, the EA may still not appear in the MetaTrader experts menu (or the Strategy tester) until you close the MT platform and restart it.  This is annoying and I am working on it.  The only decent work-around I’ve found to date is to leave the MetaEditor open, and after building the system in VTS, recompile the MQL in the MetaEditor by pressing F7 or clicking the compile button.  (The MQL file is automatically refreshed in the MetaEditor in most cases. There clearly a few bugs left to be fixed in build 610).

 

There were a few other fixes related to “wide-strings” and the arrays used in the grid plug-in. There were also some fixes related to the save-as function that were not related to the build 600 update (regular old bugs!)

Thanks for the feedback from everyone – it really helps.  As of today, we did full testing against MT build 610.  I’m sure MT will keep releasing upgrades for the issues traders are seeing on the platform, but I don’t expect them to be as disruptive as the first build 600 update.  In any event, I do expect we’ll find a few more issues, and there will be VTS updates to address them.

(Here are VTS update instructions: http://expert-advisor-builder.com/faq/how-do-i-update-vts/)

 

Version  4.0.0.64

We just released a new version of VTS to address the remaining build-600 issues.

Note: All of these changes are backward compatible, so you should be able to switch back and forth between pre-Build 600 and post-Build 600 MT builds without any worries.

We added a few more changes to make sure EA’s are created properly and placed in the correct folders:

  • VTS will search for the needed include files (stderr.h, etc.) and pass the location to the MetaTrader compiler
  • After a successful build, VTS will copy EAs to any MetaTrader ‘AppData” folder
  • VTS writes the location of all Expert Advisor files to the Output window (at the bottom of VTS).  If you are not sure where your EAs were built, check this window for the exact path.
  • VTS allows you to define 2 folders where your EAs will be copied to after a successful build. In VTS, got to Tools->Options->Preferences to see these choices:
    • Mq4CopyFolder1   (folder 1 where the EA’s mql code is copied)
    • Mq4CopyFolder2  (folder 2 where the EA’s mql code is copied)
    • Ex4CopyFolder1    (folder 1 where the EA’s ex4 code is copied)
    • Ex4CopyFolder1    (folder 2 where the EA’s ex4 code is copied)
VTS Preferences

VTS Preferences

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

There was a build error with the “Platform Test EA” that has been resolved.

The function “fnIsTrendLineBroken” was updated to support the MQL5  stricter “switch” statement syntax.

There were a number of other updates and fixes in version 4.0.0.64 not related to build 600. They can be viewed in the VTS README file.

 

Update March 24, 2014:  MetaTrader Build 616

In build 616, MetaQuotes has removed the compiler (mql.exe or mql64.exe) from the standard MetaTrader installation. This was not a mistake – they intentionally removed the compiler (I have no idea why!)

This means when you upgrade your MT platform to build 616 or greater, the compiler executable will be deleted. Then when you build with VTS, VTS will prompt you to locate the file – which of course is missing.

For now, please download the file from this location and install it in your MT folder:

Here is a link to the original MT post (it’s in Russian): http://www.mql5.com/ru/forum/21374

MetaQuotes states these locations will always have the latest compilers.

In the next VTS release, I think I will bundle the MT compiler with VTS. That way, you will not have to bother with the additional download.

  iExpertAdvisor - MetaTrader Expert Advisor Builders
Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*