Integrating Several Python Scripts to EA(Expert Advisor) using Socket

 

I created an AI trading bot in MetaTrader 4 and 5. Implemented a Python script to use the AI model and integrated it with the EA using socket communication. Runs well for one forex pair.

Now I want to increase my Forex pairs and trade with more pairs. So, I need to develop several Python scripts for each prediction model.

But I can't connect multiple such Python scripts to one EA using sockets. I thought I could set multiple port numbers, but I'm not sure how to do it.

I believe we have the best experts here to solve this problem. Please let me know if anyone can solve this problem.

Thank you, Robert Brooks.

[Deleted]  
Did you try searching CodeBase? There are quite a few examples there.
MQL5 Code Base
MQL5 Code Base
  • www.mql5.com
MQL5 Source Code Library for MetaTrader 5