C++ Convertion and Development - page 3

 

In other words, if someone can tell me how I can make MT4 immediately responsive to events from an external dll library (maybe a script that polls every second or so), I can duplicate this...

 

Make a What_I_Do() fonction and a GET_FEED(double,double,string) fonction in your DLL. The What_I_Do() fonction only return integer, so your script will get the parameter and do what you want like if What_I_Do() return 1 then buy or sell or anything , if 2 close order etc etc , you see what i mean im sure. For the GET_FEED, each time you receive a quote you will pass the Bid and the Ask , will look like GET_FEED(1.9876,1.9877,"EURUSD") , this information will be stored in your DLL.

For the connectivity you will create a mini server in your DLL using Socket. So now you can connect a application to the port number of your mini server and retreave information (the bid, ask , symbol) and you can send information too by your server directly to the metatrader platform using the What_I_Do() fonction , each time you receive a quote the information will be sent to the DLL fonction and sent to the user who are connected to the port number of the server, if the application send to the server a action to do the What_I_Do() will return a integer for the action like 1 for buy, 2 for sell, or anithing you want.

Hope this will give you some idea on how to link a application to the Metatrader platform.

P.S Sorry for my bad english

 

Take a look at the sleep function. However it doesn't appear to work in eas or indicators, only in scripts. So you can set up a loop in a script that sleeps for 1 sec or less, then checks for incoming messages.

dwmcqueen:
In other words, if someone can tell me how I can make MT4 immediately responsive to events from an external dll library (maybe a script that polls every second or so), I can duplicate this...
 

Then this is easily replicated.

 

Api

I have contacted the developer of the "MT4 API" about its use.

As a result, my company may have a future announcement regarding the use and support of this dll.

 

Dead links?

Hi all,

The site that selling MT4 API seems dead now can some one will tell me were we can found it again, some of programmer's here are looking for it.Also i heared that many cracked version of Metatrader server components out there

 

MT4 APIs

I haven't heard before that MetaQuotes provided or intend to provide MT4 APIs! Can you tell me what the APIs mean to you??? Maybe I can build our own
 

We are about to release and support the MT4 API provided by this programmer.

 

The so-called MT4 API mentioned isn't a real API. What it is is a EA that listens for commands sent to it from an external dll and executes them. It requires MetaTrader to be running.

It works, but is a little strange.

 
mqldev:
I think that could not be done! Communication with MetaTrade is only one way - The MT have to query you c++ dll!

This most certainly can be done.

I have not done this, but I could do it without much complication if I wanted. You must write an EA which is active all the time. The EA would wait inside a "while" loop, and it would call a function exported from a DLL. If there is no pending command, the call will exit, and the loop continues. If there is a command, data can be passed from the DLL.

Once the EA has data, it can use it to open a trade. All kind of trade parameters can be given to the EA, enough to do anything. The rest is basically all inside the DLL code, which if I understand correctly can be written in any language which allows DLL targets.

Reason: