Best practices in porting C++ code into MQL5

 

What are the best practices and how-tos in porting C++ code into MQL5, with minimal changes?

Are there ready made preprocessors that I can use?

Also, I do not see a way to bind sockets in MQL5, is it not possible?

 
Faisal Mahmood: What are the best practices and how-tos in porting C++ code into MQL5, with minimal changes? Are there ready made preprocessors that I can use? Also, I do not see a way to bind sockets in MQL5, is it not possible?

I suggest you first learn the MQL5 language and its environment properly. You are making too many assumptions about MQL5 and C++ equivalence. MQL5 is not a general purpose language. It is specifically designed around the trading environment of the MetaTrader terminal and it has to be understood in that context.

EDIT: MQL5 Sockets works as a client. It cannot act as a server. Hence, no socket binding.

 
Fernando Carreiro:

I suggest you first learn the MQL5 language and its environment properly. You are making too many assumptions about MQL5 and C++ equivalence. MQL5 is not a general purpose language. It is specifically designed around the trading environment of the MetaTrader terminal and it has to be understood in that context.

EDIT: MQL5 Sockets works as a client. It cannot act as a server. Hence, no socket binding.

I would like to leverage experts like yourselves who have already tried/tested various ways to integrate MQL5 to other languages. Thus my question on best practices.