Trading robot platform on the Russian stock exchange

There are currently 25 million private investors listed on the Moscow Stock Exchange. Five years ago they were 10 times less. The more non-professional players come to the market, the more popular among them is the desire to make a robot for automatic trading.

For the Russian stock market, there are actually only two platforms for this purpose.

These are MT5 (MQL5 programming language) and QUIK (Lua programming language).

But for most beginner robot builders, both languages ​​are unfamiliar.

With the rapid development of neural networks, Python is gaining more and more popularity.

Of course, you can pass data from these applications to any other python application. But the primary information from the exchange, as well as trading operations, will need to be implemented in MQL5 or Lua.

In real-time systems, which include robots for trading on stock exchanges, speed is an important point.

Below are the results of comparing the performance of scripts and programs in various programming languages ​​that are typical for writing trading robots.

I took the test sources for MQL5 from the MetaTrader5 forum. Previously, these tests were used to compare 32-bit versions of MT5 and QUIK VM Lua 5.2.

I tested 64-bit versions of MT5, QUIK VM Lua5.3 and Lua5.4.

Since I implemented the QUIK VM LuaJIT extension to create multi-threaded robots, I added VM LuaJIT tests, as well as one PYTHON, C and C AVX2 test each.

test results

test results

test results

test results


1) VMLua5.4 is about 1.5 times faster than VMLua5.3 and 5 times faster than Python;

2) MQL5 is 2…10 times faster than VMLua5.4;

3) VMLuaJIT is 1.5…7 times faster than MQL5;

4) C is about 1.7 times faster than VMLuaJIT;

5) C(AVX2) is about 4 times faster than C.

Similar Posts

Leave a Reply

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