How to run or call Python script from .mq5 expert advisor

 

Hey. I have created a file called python.py in Scripts/Python.py

I just need to call/run that file from my .mq5 expert advisor...

Is that possible?

 

nithinpiratez: Hey. I have created a file called python.py in Scripts/Python.py. I just need to call/run that file from my .mq5 expert advisor... Is that possible?

Usually Python calls the MT5 API, not the other way round.

Running external applications from MetaTrader requires the use of DLL calls to the Windows API.

 
Fernando Carreiro #:

Usually Python calls the MT5 API, not the other way round.

Running external applications from MetaTrader requires the use of DLL calls to the Windows API.

If possible, Can you please give me a Sample DLL file code so that I can create with Visual Studio and import inside my script or EA...

My objective is to call a function inside the DLL file from mql script and display the values...

Help me...how I can do this?

 
nithinpiratez #: If possible, Can you please give me a Sample DLL file code so that I can create with Visual Studio and import inside my script or EA... My objective is to call a function inside the DLL file from mql script and display the values... Help me...how I can do this?

There are already many examples in the Articles and in the CodeBase on using DLL calls. Please do a search and study them.

However, please note that this is not for novice coders. A great degree of understanding on Windows API programming is required.