I've been trying to test my socket connection using tester, as I will need it to communicate back and forth with Python. But it keep returning 4014. What I found in the documentation ( https://www.mql5.com/en/docs/network/socketconnect), it cannot be called from an indicator, I've made it as an expert advisor, it shown itself in Expert Advisor tab. Is it can't be used in socket? If it not, is there any other alternative to established communication between Python and MetaTrader other than using file? I've been using file, but it so slow as I need to give it delay for each iteration so they do not try to read a file at the same time as the other write them.
I chanced upon ZeroMQ recently - you might want to check it out.
I've been trying to test my socket connection using tester, as I will need it to communicate back and forth with Python. But it keep returning 4014. What I found in the documentation ( https://www.mql5.com/en/docs/network/socketconnect), it cannot be called from an indicator, I've made it as an expert advisor, it shown itself in Expert Advisor tab. Is it can't be used in socket? If it not, is there any other alternative to established communication between Python and MetaTrader other than using file? I've been using file, but it so slow as I need to give it delay for each iteration so they do not try to read a file at the same time as the other write them.
You can't use SocketXXX function from the tester. See below article.
mql5 has now possibilities to integrate Python and MT5 : https://www.mql5.com/en/docs/integration/python_metatrader5
An other time please do some researches before posting.

- www.mql5.com
You can't use SocketXXX function from the tester. See below article.
mql5 has now possibilities to integrate Python and MT5 : https://www.mql5.com/en/docs/integration/python_metatrader5
An other time please do some researches before posting.
I've known the link before posting this, but it does not provide what I need. That's why I'm trying to use socket rather than the library. I need for Python to be able to reply with their own data.
But, I really appreciate your reply. Thank you for your help.
I've known the link before posting this, but it does not provide what I need. That's why I'm trying to use socket rather than the library. I need for Python to be able to reply with their own data.
But, I really appreciate your reply. Thank you for your help.
Sockets are not supported by the MT4 Tester. But there is a simple workaround for this as
shown in the link:
http://www.fxdesignlab.com/wp-content/uploads/2020/08/EA-Comm-by-Sockets-with-the-MT4-Tester.pdf

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I've been trying to test my socket connection using tester, as I will need it to communicate back and forth with Python. But it keep returning 4014. What I found in the documentation ( https://www.mql5.com/en/docs/network/socketconnect), it cannot be called from an indicator, I've made it as an expert advisor, it shown itself in Expert Advisor tab. Is it can't be used in socket? If it not, is there any other alternative to established communication between Python and MetaTrader other than using file? I've been using file, but it so slow as I need to give it delay for each iteration so they do not try to read a file at the same time as the other write them.