Best way to call MQL4 functions from C++ ?

 

Hi guys

I've developed a strategy using C++ in Borland C++ environment and I wanted to rewrite it in MQL4 but then I figured why not calling MQL4 functions right from C++ instead !

You know, functions like OrderSend() , OrderModify() and things like that. 

That would actually save me a lot of time and I'm way much better developing my strategy in C++. 

So I searched for this and found some TCP Socket libraries but I'm not sure if they would do the job right. Cause I figured you have to poll for socket activities inside MQL4 and there is not a time critical function in MQL4 which is guarantied to be executed every 100uS or any other short period. 

So is there a better way or maybe some ready to use api or C++ class to do this ?  

 
mostafanfs:

Hi guys

I've developed a strategy using C++ in Borland C++ environment and I wanted to rewrite it in MQL4 but then I figured why not calling MQL4 functions right from C++ instead !

You know, functions like OrderSend() , OrderModify() and things like that. 

That would actually save me a lot of time and I'm way much better developing my strategy in C++. 

So I searched for this and found some TCP Socket libraries but I'm not sure if they would do the job right. Cause I figured you have to poll for socket activities inside MQL4 and there is not a time critical function in MQL4 which is guarantied to be executed every 100uS or any other short period. 

So is there a better way or maybe some ready to use api or C++ class to do this ?  

I've been interested in doing something like this for a while because I'd like to develop strategies in python. There's a really cool project by dingmaotu on github which turns a MT4-EA into a zmq server. The rest would be simply grinding away at the keyboard converting MQL functions to JSON abstractions.