problems using new MT4 API

 

Hi: Any help with this is appreciated, thank you!

I noticed tonight your new MT4 API.. at https://forum.mql4.com/14219 just what I need! I have a C++ DLL that I coded that crashes when I try to call OrderSelect when running on Alpari's MT4 Platform. So, I assumed I need to use your API and then call OrderGet_MT4. But, some questions:


I did not get tzmt4api.dll called by the mqh #import "tzmt4api.dll" statement in the downloaded zip file. I did get a bunch of info*.dlls in the source directory.

So, how can I call OrderGet or any other function without that dll?


Another question please:
What are the .srv files for and how do I use them? The do makes no mention of that that I could find.

Lastly, do you have any sample calls to your API, not just header defs? I have not had to use a "handle" when coding in MQ4. For example,

ticketno = (OrderSelect(1,SELECT_BY_POS,MODE_TRADES)) for mq4 does not use a handle in getting the first order. So, how do I call

"int OrderGet_MT4( const int handle, const int index, const int select, const int pool );" using this header?


Thanks so much!


jhhcoder
 
C:\WINDOWS\SYSTEM32\tzmt4api.dll
 
getch2:
C:\WINDOWS\SYSTEM32\tzmt4api.dll

HI: thanks so much, I found it. I have been able to load the library, but have one more small issue: am trying to use OrderSelect(), but have never had to use a handle with MQ4 before. Do you know what I am supposed to suppy here (for the handle)..at which point is the handle instantiated..is there any small example call to this or a similar function I could see for the tzmt4api.dll library? Thanks once again!


jhhcoder

 
jhhcoder:

HI: thanks so much, I found it. I have been able to load the library, but have one more small issue: am trying to use OrderSelect(), but have never had to use a handle with MQ4 before. Do you know what I am supposed to suppy here (for the handle)..at which point is the handle instantiated..is there any small example call to this or a similar function I could see for the tzmt4api.dll library? Thanks once again!


jhhcoder

Hi, jhcoder!


Take a look on <Program Files Folder>\TradeZone\TZMT4API\Developer


You'll see some samples as you need.


Kindest regards!