How to communicate with MetaTrader 5?

 
I have written a code in c and I want this code to be able to communicate with MetaTrade 5? How can I do this? should I do this through API and the broker website, or is the anyway to send and receive information to and from metatrader? I don't want to, neither have the patience to change the code into MQL5. 
 
any one?
 
The codes are similar to C and C++ and some builtin functions are also include in mql4/5 so you have to see in metaeditor program by putting all code in it and then compile for error .. fix the bugs and run 
 
disthedat:
I have written a code in c and I want this code to be able to communicate with MetaTrade 5? How can I do this? should I do this through API and the broker website, or is the anyway to send and receive information to and from metatrader? I don't want to, neither have the patience to change the code into MQL5. 
DLL, Named Pipes, Sockets, Files
Reason: