MetaTrader 5 Python User Group - how to use Python in Metatrader - page 30

 
fxsaber:

What motivates you to do this?


It's the second day of writing the Tester's automator. I'm going to post it in the KB, and I'd like to somehow understand whether it's a necessary thing or just another geeky hack. Because I often don't understand why developers don't do it but actively do something else, which seems to be in less demand. I may be wrong in my estimation.

We will completely rewrite the tester from scratch. We have already started the process.

To understand our actions think in big numbers and in the horizon of 5-10 years. It is true that the evidence statistics that we have will remain overboard.

We have huge changes in the technology under development and not all of them concern the terminal.

 
Renat Fatkhullin:

To understand our actions, think in big numbers and in a 5-10 year horizon.

Realistically, I can't imagine how much MT5 integrations with MO might induce Data Scientist programmers to become interested in MT5 and MQL5 in particular.

And it's certainly hard to believe that this will give a new current in the Marketplace.

Perhaps some mentions will arise in the MO lounges of traders. Although, I'm leaning more towards the mate community where there will be interest in simple and effective use of the Cloud in mate mode.

Without marketing, there is almost no chance of even good things taking off.
 
A narrow view, I have shown the direction to broaden the understanding of the industry and its future.

 
Renat Fatkhullin:

Has anyone already used Python integration in MetaEditor in builds 2302 and above (better beta 2304)?


The first version of integration into the editor is working now, and the next will be:

  • running scripts (not experts) and services as Python *.py programs
  • a completely rewritten metatrader5 python library with access to charts, symbols, ability to trade, trading history
  • highlighting in the editor

Already running *.py and *.ipynb programs in the editor works.

Please give it a try.


After the machine learning via python scripts we will move on to implementing WinML with ONNX natively in MQL5 itself.

It is certainly interesting.

However, the most important thing will be the ability to parallelize training to agents - this is exactly what python doesn't have.

 
Aleksey Vyazmikin:

This is certainly interesting.

However, the most important thing would be the ability to parallelize training per agent - this is exactly what is missing in Python.

More precisely, to define on the fly a task for the next agent, or a number of tasks for the cloud, and dynamically - depending on the result, change it. And when sending file to the agent, set some flag (upload one file and don't delete it until finish (until tasks stop)/// or swap if needed a new file which can be generated on the fly (during optimization)).

 
Aleksey Vyazmikin:

This is certainly interesting.

However, the most important thing would be the ability to parallelize training to agents, which is something Python does not have.

With python scripts this is not even theoretically possible:

  • It requires both python itself and completely insecure, unverifiable libraries to be installed on agents
  • The whole agent network would be affected on the first day
But WinML + ONNX models in the secure MQL5 will already be available to the cloud network. But this is the next stage.
 
Renat Fatkhullin:

... and then there will be:

  • ...
  • Fully rewritten metatrader5 python library with access to charts, symbols, trading capability, trading history

Already running *.py and *.ipynb programs in the editor works now.

Tell me, do you plan to enable the python library metatrader5 to connect to MT5 on Android?

Phone devices today have become so powerful that many data analysis and visualisation tasks can quite easily be done on python on android.

I think trading bots will be in demand too. )

Скачайте мобильное приложение MetaTrader 5 для Android
Скачайте мобильное приложение MetaTrader 5 для Android
  • www.metatrader5.com
Мобильный трейдинг с MetaTrader 5 для Android — это возможность торговать валютой, акциями и фьючерсами при помощи смартфонов и планшетов. Где бы вы ни были, вы можете подключаться к серверам брокерских компаний, анализировать котировки акций и валют и совершать торговые сделки. Все это — бесплатно и круглосуточно! MetaTrader 5 для Android...
 
Renat Fatkhullin :

Version 5.0.11 includes versions 3.6, 3.7 and 3.8.

Unfortunately, older versions will not be supported. We will soon rewrite the whole library from scratch and add many features, including trading.

Sounds great .... I will wait for this version. Please include all versions of Python 3. Since most people these days use Python 3. I think there might be a problem with Python 3.4.x, so it can be ignored.

 
Renat Fatkhullin:

With python scripts, this is not even theoretically possible:

  • It requires both python itself and completely insecure, unverified libraries to be installed on agents
  • The whole agent network would be affected on the first day
But WinML + ONNX models in the secure MQL5 will already be available to the cloud network. But this is the next stage.

In addition to NS, we need variants of tree algorithms and a bunching to parallelize tasks by agents.

 

Equipment:

MetaTrader 5 x64 build 2304 started (MetaQuotes Software Corp.)
Windows 10 (build 18363) x64, IE 11, UAC, Intel Core i3-3120 M  @ 2.50 GHz, Memory: 3611 / 8077 Mb, Disk: 80 / 415 Gb, GMT+2
C:\Users\barab\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075

and environment variables

environmental variables

the script

script path


# This program says hello and asks for my name.
print('Hello world!')
print('What is your name?')
myName = input()
print('It is good to meet you, ' + myName)


Editor settings:

editor settings


When clicking on the "Compile" button, the editor just goes into

the editor is doing something

and nothing else happens.

Should something be running at all?

Reason: