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

 
Andres Kull:

I'm running EA, localhost is enabled. 


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

 
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

 
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
 

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

 

@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:
Fibs3.png  50 kb
 

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

 
Amazing.
Thank you for sharing.
 

I'm segnaling an error.


Functions:

-MT5CopyRatesFrom

-Mt5CopyRatesFromPos

-MT5CopyRatesRange


Return tuple of MT5Rate object, MT5Rate object has low attribute that is actually the high and high attribute that is low.

You can clearly see this error on the documentation page, the print statements at the end of the page it's the exact same problem i get with MetaTrader5 5.0.6.

 

Im getting the next error when i try to install the metatrader repository with pip:

In file included from src/MetaTrader.cpp:6:

src/stdafx.h:16:10: fatal error: 'sdkddkver.h' file not found

#include <sdkddkver.h>

          ^~~~~~~~~~~~~

 
Maxim Dmitrievsky:

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
hi maxim

i'm trying to install EA and Python client by your instruction but i'm getting a 4014 error . like andres kull comment ,SocketCreate ends with error when i execute it on strategy tester.

can you guide me to fix this problem? and this problem has been fixed by developers from  2019.05.04 (the Date of this post ) ? 

i'll really appreciate you . 



Reason: