Discussion of article "MetaTrader 5 and Python integration: receiving and sending data" - page 2

To add comments, please log in or register
Maxim Dmitrievsky
29826
Maxim Dmitrievsky  
Andres Kull:

I'm running EA, localhost is enabled. 


hmm.. I dont't know. Python program must be running before.

Andres Kull
41
Andres Kull  
Maxim Dmitrievsky:

hmm.. I dont't know. Python program must be running before.

The issue is narrowed down.

SocketCreate is successful if EA is attached to chart.

SocketCreate ends with error 4014 if EA is executed in Strategy Tester

Maxim Dmitrievsky
29826
Maxim Dmitrievsky  
Andres Kull:

The issue is narrowed down.

SocketCreate is successful if EA is attached to chart.

SocketCreate ends with error 4014 if EA is executed in Strategy Tester

ahh, right. Sockets still not work in strategy tester, maybe later developers fix this 

"Unfortunately, the current implementation of the socket client in MetaTrader 5 is not suitable for running in the Strategy Tester, so no full testing and measurement of the solution performance were performed. Let us wait for further updates of the socket functionality" from the bottom of the article
Admiral Thrawn
125
Admiral Thrawn  

Hi  guys,

though very limited, but you can try following steps in a live chart:

1. Load your data from history or precomputed results from other indicators
2. Add a loop in the tick processing call, which simply loops over each item of your pre-loaded data.
3. Let your EA decide on each loop -> write your results (buy/sell/update SL, etc.) to a file for later performance analysis.

Hope that helps a bit.

Cheers,
AT

yogibass
5
yogibass  

@Maxim Dmitrievsky

I just wanted to say thank you for making this available. I always wanted to be able to code my indicators in Python and since you began this thread I've been able to access realtime futures data and use it to develop and run my indicators. I use my Python to plot and analyze the live feed and I place trades through the MT5 platform - it works great. Please keep up the good work and I truly hope Python will be full embraced my the MT community.

Thank you and best regards!

Files:
philforexrcm
3
philforexrcm  

Thank You Maxim !

This article is really helpful.

I was wondering if the Python server is on an another PC ( Windows 10 ) on a local Network did you experiment some socket connection error ?

I ask you that question because on same local host all is fine fine. The connection is perfect . However if I want to have the server program on another PC then I get a socket connection error ( connot connect )

I did check with ping command the remote PC IP , all is fine.

I did add IP address in the Expert advisor URL section.

What could prevent the socket connection ( outside the Firewall ) ?

I did make the change in windows firewall ( however I'm not a create expert there ).

I was wondering if the MT5 socket works on a local network...


Thank you in advance for any suggestions because I' m stuck


Philippe

12
To add comments, please log in or register