Asynchronous onTick() function or bi-directionnal mql<->dll com

 

Hi,

I use a c++ dll into my mql5 EA and i have a big problem, i just can't send orders from my extern dll algorythm.

If i write this :

onTimer()
{
  while(true)
  {
  }
}


the onTick() is never trigger, because there is only one thread allocate for the EA...

and it's a big problem.

1st question, do you know if multi task/thread is possible in mql5 ? or to have onTimer() and onTick() asynchronous functions ?

2nd, how to make call to big external dll algorythm function, without Block ALL our EA process ?

3st, how to send orders when external dll isolated events occured ?


Thanks a lot

 
ne0vincent:

Hi,

I use a c++ dll into my mql5 EA and i have a big problem, i just can't send orders from my extern dll algorythm.

If i write this :


the onTick() is never trigger, because there is only one thread allocate for the EA...

Most probably because you block it.


and it's a big problem.

1st question, do you know if multi task/thread is possible in mql5 ? or to have onTimer() and onTick() asynchronous functions ?

No multi-thread.


2nd, how to make call to big external dll algorythm function, without Block ALL our EA process ?

You have to code you DLL function as an asynchronous one.
Reason: