I'm running EA, localhost is enabled.
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.
ahh, right. Sockets still not work in strategy tester, maybe later developers fix this
though very limited, but you can try following steps in a live chart:
1. Load your data from history or precomputed results from other indicators2. 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.
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!
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