Discussion of article "MetaTrader 5 on Linux"


New article MetaTrader 5 on Linux is published:

In this article, we demonstrate an easy way to install MetaTrader 5 on popular Linux versions — Ubuntu and Debian. These systems are widely used on server hardware as well as on traders’ personal computers.

The MetaTrader 5 platform is ready to run on Linux

Author: MetaQuotes

Jinsong Zhang  

As was already mentioned above, Wine is not a completely stable software. Thus, some functions of the MetaTrader 5 terminal may work improperly. Currently the following issues are discovered:

God ~~~

anyone has way to get Metatester agent working on Playforlinux?


getting this problem

Unhandled exception: illegal instruction in 32-bit code (0x0057f88a).


have tried setting to winearch=win32

$ WINEARCH=win32 .PlayOnLinux/wine/linux-x86/1.5.21/bin/wine cmd.exe /c echo %WINEARCH%



full error message: 

Unhandled exception: illegal instruction in 32-bit code (0x0057f88a).


00000027 (D) C:\Program Files\MetaTrader 5 Strategy Tester\MetaTester.exe

00000028    0 <==

System information:

    Wine build: wine-1.5.21

    Platform: i386

    Host system: Linux

    Host version: 2.6.32-5-686 


With Ubuntu 12.04 64bit I was not able to install MT5 with any recent version of WINE on a VPS that also uses Gnome GUI 3.4.2 and a 4 core XEON 3.4GHz processor / 1Gb RAM.

With Ubuntu 12.04 32bit I was able to install MT5 32bit with WINE 1.5.23. Rapid switching between timeframes on the same chart causes MT5 to crash but it is otherwise stable. As with previous commenter, Metatester does not work on linux.

I prefer running my VPS on linux because it is a much faster operating systerm (OS) than Windows Server which requires large memory/resouces.

Ok I understand that Metatrader has been designed for Windows but Windows is not the best operating system for a VPS. And a VPS is what you need to use the majority of EA's designed for MT5!

For a VPS, licensing issues etc make Windows desktop OS (eg. Windows XP, 7 , 8 etc) impractical. Windows Server is the Microsoft OS that some hosting providers will allow on a VPS if you want to run Metatrader but because Windows Server is designed to do a lot more (ie. it is a server not just a desktop interface) it uses huge amounts of resources on functions that are irrelevant for a VPS running a Metatrader EA. The result being Metatrader often runs very slow.

As such it would be great if the very clever people at Metaquotes could resolve the bugs that prevent Metatester working on linux. Thanks!

Get in touch with developers using Service Desk!
Get in touch with developers using Service Desk!
  • www.mql5.com
We therefore attach great importance to all user reports about issues in our programs and try to answer each one of them.
Andrias Johanson  
I loving trading using ubuntu/linux... it is more safe from malware and i can stay away from any attack from outside.......

Hello :)

I have run MT4 and MT5 on Linux using Wine and VirtualBox, all on CentOS 6.5.  The benefit, as I see it, of using CentOS is that it mirrors RedHat Enterprise Linux, and each release has a longer support life than other distributions.  I use Ubuntu, but that is for home and multimedia applications, to which it is well suited.  CentOS is much more a corporate style operating system; few frills.

Using Wine, I have found the installation to be easy, and the tester works fine. 

Using VirtualBox is equally easy, but there is a small performance degradation, and therefore I like to use Wine.  This is especially noticeable when running optimisations. 

Highly recommend it.  Can't understand why Metaquotes hasn't provided a native port to Linux, especially after all the recent revelations of spying in Windows 8!


Solved: "Expression could not be evaluated"

Workaround for enabling watches on MetaEditor (Version: 5.00 Build 934).

// Just paste it on your own program
void fctDebugWatchesWorkaround()
   MqlRates rate;
   Print(rate.open); // Force expressions evaluation while debugging

Thanks from me too. Had the luck to stumble upon this page ;-)

But though it works fine when I use it on indicators containing "void OnStart()", I don't have any success with one, only having "OnCalculate", explicitly Stochastic.mq4.

Is there anything, I can change there to enable watching expressions?

Thank you.

Add following code before function.
class CFix { } ExtFix;