howto exchange data and control between dll and metatrader?

 

Hi!


A very good description and video for how to write a dll for metatrader is described here:


http://www.mistigrifx.com/tools/writing-basic-mt4-dll


Still my question is how can we exchange data from the dll to metatrader. If for example a function in the dll should return several values, how is this done?


Also how can my dll call functions in metatreader? For example my dll decides that an order shall be closed, how can it call the metatreader function "orderClose"? Does it exist an API for metatrader?

Reason: