MetaTrader 4 Build 600 with Updated MQL4 Language and Market of Applications Released
Please change the version numbering, Currently, MT version numbering gives no idea which MT is stable and which one is beta.
And BTW, My Windows Title still showing different broker, and I still have to close and open after live update instead of restart.
Is it just me or anybody else have the same problem ?
I have no problem setting Portable, but please, change this picture below to the English one, most of us here does not understand Russian and can't use online translator for that picture anyway.
file_src_path = TerminalPath()+"\experts\files\
which code should i have to use for file path?
with Regards
Saravana
Open new MetaEditor, click Help menu and click MQL4 Reference. Use "CheckUp > TerminalInfoString.
I got you bro.. thank you so much..
Is it possiable to compile the same Standard Library as MQL5, same file structures, same functions? so we can complie mq5 it to .ex4 under mql4 easily.
//+------------------------------------------------------------------+ //| Include | //+------------------------------------------------------------------+ #include <Expert\Expert.mqh> //--- available signals #include <Expert\Signal\SignalBullsPower.mqh> //--- available trailing #include <Expert\Trailing\TrailingFixedPips.mqh> //--- available money management #include <Expert\Money\MoneyFixedRisk.mqh>
I was using the Code
which code should i have to use for file path?
with Regards
Saravana
The best way is
TerminalInfoString(TERMINAL_DATA_PATH)+"\MQL4\Files"
Hey friends I was using this code well before MT4 updated to build 600.. but now it's not working well.
kindly guide me some one..
string file_src_path = TerminalPath()+"\MQL4\files\*.csv"; string file_dst_path = "C:\Data"; string file_path = "/c move /y "+"\""+file_src_path+"\""+" "+"\""+file_dst_path+"\""; string cysymbol = Symbol(); int cytfs[] = {PERIOD_D1,PERIOD_W1}; int num_tfs = ArraySize(cytfs); int cur_tf,j; for (j=0; j<num_tfs; j++) { cur_tf = cytfs[j]; exportfle (cysymbol,cur_tf); } ShellExecuteA(0, "Open","cmd.exe", file_path , "", 1); return(0);
I'm updated my MT4, but my anti virus detected this threat.
I have tried to re-download the update from another broker. but same threat came up.
any suggestion?
Hey friends I was using this code well before MT4 updated to build 600.. but now it's not working well.
kindly guide me some one..
Please read post above. You have to correct path

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
MetaTrader 4 Build 600 with Updated MQL4 Language and Market of Applications Released
Over the past 7 months since the release of the public build 509, we put in a lot of effort to improve MetaTrader 4 client terminal. MQL4 programming language for developing trading strategies has undergone the most significant changes - program execution speed has been increased, while the language itself has been brought closer to MQL5 to the maximum possible extent. This means that MQL4 trading robot developers can now also enjoy all the advantages of OOP: classes and structures, inheritance, Standard Library, resources and much more.
New MetaEditor provides such features as debugging, profiling, personal storage, autosubstitution of function names, snippets, inserting resources and intelligent code management.
The new MetaTrader 4 terminal features the Market - store of protected applications for MetaTrader 4 terminal. Now, any developer can put his or her own trading programs for sale on the unified application store, while traders can buy any product right from the terminal. All EX4 application files downloaded from the Market have the high level of protection similar to that of MQL5. MQL4 application developers can set the number of activations and prices for their products without worrying about the technical issues related to sales process - MetaTrader 4 Market will take care about the latter.
Due to changes in the file structure and location of the directory for storing custom files (indicators, Expert Advisors, scripts, templates, logs, etc.), all these data will be automatically moved to the new place during the update. Not a single custom file will be deleted during the process, and all original files will remain in their appropriate locations becoming backup copies. Find out more about that in the section Automatic Copying of MQL4 Programs When Updating from Older Builds below.
MetaTrader 4 Client Terminal
Increased operation speed of MQL4 apps, provided built-in support of DLL and Visual Studio, implemented access to MQL5 Storage and much more.
Why Has the New Data Storage System Been ImplementedMicrosoft Windows XP released 13 years ago allows applications to write their own data at the place of their installation even if the latter took place in Program Files system folder. A user should only have an administrator permission to write data to any folder.
Starting from Windows Vista, Microsoft has introduced a restriction on writing to Program Files directory. If User Account Control (UAC) system is enabled, programs are not allowed to store their data in Program Files folder. All data should be located in a separate user directory. This limitation has been introduced in order to protect users against malicious programs and to prevent applications under one user account to change or damage the same program's data necessary for another user account. Since that time, security requirements in Microsoft operating systems have been tightening further. In particular, starting with Windows 8, UAC system cannot be disabled even if "Never notify" option is selected in its settings.
Microsoft has implemented virtualization process in order to provide compatibility with older applications when using UAC. If a program tries to save its data to Program Files directory, the data is actually (physically) saved to a separate folder having the following look - C:\Users\<user-name>\AppData\Local\VirtualStore\Program Files, while Windows File Explorer shows the files as if they are saved in the installation directory. Microsoft claims that this mode has been provided only for compatibility and can be removed later.
In order to comply with Microsoft recommendations, the data storage structure has been changed in MetaTrader 4 client terminal starting from build 600. Now, the terminal will also save its data in a user directory.
User Data DirectoryIn the new version, all data of a certain user working with a certain copy of MetaTrader 4 terminal are stored in a special place called terminal data folder. This folder can be found on a system disk (a disk with installed Windows operating system) along the following path
where:"Open Data Folder" command has been added to File menu of the terminal for searching and opening the data folder.
The root of each terminal data folder also contains origin.txt file where you can find the path to the installation folder of the terminal this data refers to. This allows users to match each terminal data folder with a certain terminal installation directory, for example, in case when several copies of MetaTrader 4 terminal are installed by a user. This type of working with the terminal when the data folder is separated from the installation one is the main mode.
For more convenience, an entry containing the path to the data folder is made in the terminal's journal each time the terminal is launched. For example:
2014.02.10 12:48:28.477 Data Folder: C:\Users\JohnSmith\AppData\Roaming\MetaQuotes\Terminal\9F86138A4E27C7218E9EC98A5F8D8CA1
Copying MQL4 Application Files When Updating to MetaTrader 4 Build 600 and HigherWhen the newly updated terminal is launched, it checks if the data folder is present. If the data folder is not present yet, then it is created. If that folder is different from the installation one, the terminal's regular data (standard MQL4 programs, historical data, configuration files, templates, etc.) is copied into it. The files that are not changed during the terminal operation (executable files, mql.dll compiler, sound files, etc.) are left in the installation directory. The terminal data folder is different from the installation one in the following cases:
If none of the above conditions is satisfied, the terminal data is stored in the installation directory.
Then, the user files are moved to the data folder. At this stage, the directory where the terminal's user data has been stored is determined. If the data has been stored in the terminal installation folder, they are copied the following way:
Note: only files from the root \experts directory are copied. No subdirectories are copied, since it is impossible to reliably determine their contents
Next, it is checked whether the client terminal has stored data in virtualization directory (the operating system's virtual storage described above). If the terminal has been installed in Program Files directory and the operating system is Windows Vista or higher, the terminal data is most probably stored in that directory. If the data is found, it is copied according to the above table.
During the migration, the entries containing source and destination paths of the copied files are made in the terminal's journal. To view all the logs, open Journal tab of Terminal window and execute Open command in the context menu. The folder containing the terminal log files will open.
If the migration has been completed successfully for the current terminal copy, it is not repeated any more during subsequent MetaTrader 4 terminal updates. If the data folder is different from the installation one, and custom MQL4 applications have been copied together with the standard files during the migration, the following dialog window appears:
Portable ModePortable launch mode is provided for the terminal operation on portable devices and non-system directories, as well as for working in Windows XP. When launched in this mode, the terminal tries to save its data in the installation folder. However, using Portable mode does not guarantee that an operating system will allow storing data in the installation folder (for example, if the terminal is installed in Program Files directory and UAC system is enabled).
The following conditions should be met for working in Portable mode:
In order to launch the terminal in Portable mode, use "/portable" key. For more convenience, you can create an additional terminal launch shortcut with the appropriate name on your desktop and add the key directly to the shortcut:
Now, when placing trade requests, all of them are passed via the main connection with the trade server. Thus, the time of processing the trade requests (especially the first one) has been considerably reduced as there is no need to wait for connection to the trade server being established any more. In order for the new request sending algorithm to be operable, the trade server should also be updated - requests are still set in a separate connection on older trade servers.
Due to transition to the new model of requests processing, the ability to cancel the trade requests not yet accepted by the server (Cancel button in the trade request status dialog) has been disabled.
In the new format, RateInfo structure features fields for storing spread and trading volume:
Thus, if MQL4 programs contain DLLs for passing/accepting price data, the corresponding functions in the source codes should be rewritten and recompiled considering format changes to ensure proper operation.
Word-by-word search with regard to Russian and English morphology is used. The search is performed in the sections specified by a user in the settings:
The context menu of the search results tab contains additional commands depending on the type of results:
When management of trading levels from the chart is allowed, alert's price value can be changed by its dragging to a new price level. Alerts can be disabled or removed using a context menu on the appropriate chart level.
Just enter a company name (or a fragment of a server name) and the terminal will automatically add all servers of the company (the servers containing the specified line in their names) to the list:
The new system of working with help files also reduces the traffic consumption due to the fact that the language version of the downloaded user guide corresponds only to the language specified for the client terminal's interface (no excessive language versions are downloaded). This system also provides regular update of the user guide regardless of the client terminal update.
Specify login and email address in the registration window. After clicking Register, an email for MQL5.community account activation is sent to the specified address.
MQL5.community account allows traders to use additional powerful services:
This option is necessary when using signals on VPS (Virtual Private Server). It can also be used to increase the synchronization reliability when working with the already selected signal.Fixed errors reported on the forum and in crash logs.
MetaTrader 4 MultiTerminal
The update to MetaTrader 4 build 600 is available through the LiveUpdate system.
What's New in MQL4
MQL4 programming language has been completely revised and brought to the level of MQL5 - now you can develop trading robots in MQL4/5 using the unified MetaEditor development environment, single style, libraries and debugging tools.
MQL4 is popular among automated system developers due to the ease of learning and a huge amount of code generated for many years of using MetaTrader 4 terminal. However, the language also has some drawbacks arising from its main advantage - a simple programming language does not allow development of complex systems and hinders porting of debugged libraries from high-level languages. Therefore, we decided to implement in it the maximum possible amount of MQL5 language functions and features fully preserving MQL4 functionality. In other words, all powerful MQL5 functions, including ООP and the native code compiler, will become available in MQL4.
To achieve this, we have developed a unified compiler that automatically supports both MQL4 and MQL5 languages. MetaEditor will also become a unified application both for MetaTrader 4 and MetaTrader 5 platforms. Thus, it will be possible to compile both MQL4 and MQL5 from any version. MQL5 Storage also becomes available for work.
Protection of MQL4 applications rises to MQL5 level. New EX4/EX5 files are provided with a serious and completely revised protection. This means that the Market of secure EX4 applications also becomes available to MetaTrader 4.
Besides, MQL4 now features new graphical objects and new functions for working with charts. MQL5 Standard Library is to be ported to MQL4 providing developers with new possibilities in creating their own graphical interfaces and trading libraries. Now, you can create full-fledged applications in MetaTrader 4 using the resources.
Changes in MQL4 Language
Changed ArrayCopyRates() behavior - in the old MQL4 version, this function copied price series to double[][6] array. Now, the array from MqlRates structure elements should be used in order to receive time series:
The new format of the function also performs virtual copying. In other words, the actual copying is not performed. When the copied values are appealed to, the price data is accessed directly.
In order to maintain compatibility with old MQL4 applications, the old call format is also preserved. However, a real copying of data to double type array is now performed.
This means that the necessary data should be copied to dest_array[][] again when changing values in time series (adding new bars, restructuring or updating the last bar's Close price). In this case, the receiver array will be automatically distributed according to the necessary amount of the copied bars even if it has been declared statically.The table of differences between compilers
and new OnInit(), OnStart(), OnCalculated, OnTick(), OnTimer(), OnChartEvent(), OnTester() and OnDeinit() should exactly match their signatures
The list of the reserved words has been expanded. Thus, such widespread words as short, long, const, etc. cannot be used as names
datetime is a 32-bit integer.
Predefined Volume variable is of double type
datetime is a 64-bit integer.
Predefined Volume variable is of long type
* Please pay special attention to "Array out of range" error - many old custom indicators will display this error in strict mode of the new compiler when launched on the chart. It is recommended to find the cause and eliminate it.
** In the new MQL4 and MQL5, FILE_SHARE_READ and FILE_SHARE_WRITE flags are responsible for the files shared use mode. There were no such flags in the old MQL4.
Automatic Copying of MQL4 Programs When Updating from Older Builds
In the previous builds of MetaTrader 4 client terminal (509 and older), all MQL4 applications were stored in the following subdirectories of <terminal_installation_folder>\experts\ root directory:
In the new MQL4 version, the file structure for storing the source codes has changed. Now, all MQL4 applications should be located in the appropriate folders of <data_catalog>\MQL4\ directory:
When updating MetaTrader 4 terminal from build 509 to the newer version, all MQ4, MQH and EX4 files from standard root directories of the previous version are automatically copied and relocated to the appropriate folders. Subfolders additionally created by a user, as well as files contained there are not processed. They should be relocated to the new place manually if necessary .
No automatic re-compilation of the old EX4 files to the new version is performed during the update. Users are free to decide what source codes should be compiled to the new EX4 version. All old EX4 will work in the new MetaTrader 4 terminal. EX4 libraries compiled by the new compiler can be called only from the EX4 programs that have also been compiled in the new version.
In some cases, you may need to edit the path in #property include for included files (if relative paths have changed) in the source files. Please note that MetaEditor's root directory is now <data_folder>\MQL4\. All programs should be located in the correct subdirectories.
You can find the data folder (<data_folder>) for each copy of MetaTrader 4 terminal on your computer via the terminal menu or in MetaEditor: File - Open Data Folder.
The update to MetaTrader 4 build 600 is available through the LiveUpdate system.