MetaTrader 5 Python User Group - how to use Python in Metatrader - page 15
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
a command and a list of parameters can be passed as a string, separated by separators. When the Expert Advisor unpacks the message, it will understand what to do
The OrderSend command ?
What should the format of the string be ? string ? In the socket example, the string from mql5 socket is passedto result: socketreceive(int sock,int timeout)...result+=CharArrayToString(rsp,0,rsp_len);.return result;
OrderSend command ?
What should the format of the string be ? string ? In the socket example, the string from mql5 socket client is passedto result: socketreceive(int sock,int timeout)...result+=CharArrayToString(rsp,0,rsp_len);.return result;
not OrderSend() but just a string containing the 1st 3 characters, e.g. "BUY", followed by a list of arguments: lot, take, sl. The Expert Advisor reads the string, sees the 1st 3 letters buy and forms a Trog Request
i.e., just design a simple exchange protocol between the applications, in a free formnot OrderSend() but just a string with the 1st 3 characters, for example "BUY", and then a list of arguments: lot, take, sl. The Expert Advisor reads the string, sees that the 1st 3 letters are buy and forms a trog request
i.e., just think of a simple exchange protocol between applications, in a free form
An example from an experienced developer would be very helpful.
I've already connected a full-fledged Python to the terminal, and you're still using slow-moving sockets and pipes to make the exchange.
If it's not too difficult, how long is a single test at any timeframe?
It means we are interested in question how long optimization time in the tester is and if incorrect calculations are possible?
In previous comments you wrote that I need some background knowledge in JAVA to understand it.
I also know some C# and Python, I can program in MQL4,5, can I master your libraries rather easily, how much harder can they be?
An example from an experienced developer would be very helpful.
there is no time to explain, unless there is an article later, with examples
If it is not difficult to write how long a single test takes on any timeframe?
That is, I am interested in the question of how long the optimization in the tester and whether there are incorrect calculations?
In previous comments you wrote that I need some background knowledge in JAVA to understand it.
I do know some C# and Python, I can program in MQL4,5, can I master your libraries rather easily, how much harder can they be?
Optimization in the Strategy Tester is the same as the usual one. Incorrect calculations due to corrupted data during transfer to Python and back are excluded, because the transfer goes through RAM and not through unstable sockets or files.
Yes, I put into my library code in MQL, Java and Python. But you don't have to use Java if you don't need Apache Spark etc.
MetaTrader 5 build 2055 beta: Integration with Python, C++-like scope and massive improvements in strategy tester
Terminal: Добавлено API для запроса данных из терминала MetaTrader 5 через приложения, использующие язык Python.
Python is a modern, high-level programming language for developing scripts and applications. Contains many libraries for machine learning, process automation, data analysis and visualisation.
MetaTrader package for Python is designed for easy and fast getting of exchange data via interprocess communication directly from MetaTrader 5 terminal. The data thus obtained can be further used for statistical calculations and machine learning.
Connecting
pip install pytz
Functions
So? Is anyone working in that direction? Doesn't seem enthusiastic.
Good luck
So? Is anyone working in that direction? Doesn't seem enthusiastic.
Good luck
Optimisation in the tester is as usual. Incorrect calculations due to data corruption during transfer to and from Python are excluded, because the transfer is via RAM, not via unstable sockets or files.
Yes, I put into my library code in MQL, Java and Python. But you don't have to use Java if you don't need Apache Spark etc.
I agree that it's faster via memory, but I don't agree that sockets or pips are not stable, and the crazy memory speed when organizing a connector is unnecessary because there is latency exchange <--- (intermediate server is possible) ---> terminal, for which even hundreds of consecutive sockets within one machine are excessively enough...