access metatrader server without terminal.exe

 

Hi,


is it possible to access the metatrader server from eg. activtrades, alpair, ...


via JAVA ?


I am looking for a direct connection for snding order signals via java

e.g.


MT4Connection mt4=new Mt4Connection("IP",Port,Username,Password);

not the solution to send a message via java -> dll -> terminal.exe

Is not direct access possible?

 

i supose, like onlinebanking, no one will allow to direct connect without them own software/products.

 

You could achieve a SIMILAR effect by writing an Indicator or EA that writes the info you want 'somewhere' - either a file (easy) or shared-memory/pipe (harder but doable). Then your Java accesses that data.

To transfer information back again is harder, as start() is triggered on new quote info rather than when you decide (although using mem/pipe approach could work)

If data transfer is a one way issue from Java to MT server (e.g. generate order), you could still use the file/mem/pipe approach and talk to an EA, which will poll for info each time start() is called

 

Unfortunately not.

MetaQuotes does not want an increase of the usefulness of their platform by a factor of 5 and acceptance by serious traders. For some strange reason they want to constrain all trading to this proprietary and severely limited Windows-only software called MetaTrader. They are not interested in trying to define a new standard for retail forex trading, they strictly avoid anything that would have the potential to catapult them into the league of serious trading platforms, they intentionally keep it all heavily crippled to scare off as many professional algo traders and investors as possible and only have destitute housewives and little Joe Sixpacks like you and me in their user base. Therefore they MUST keep their API secret to make it unattractive for any serious and big (threatening?) money.

 
brewmanz:

To transfer information back again is harder, as start() is triggered on new quote info rather than when you decide

You can trigger start() from an external application. You need to use the Windows API PostMessage() to send a special message to the chart window that will instantly trigger the start() function of every indicator and expert advisor on this chart, even if there are no incoming quotes. All you need is the chart window handle you get in mql4 with WindowHandle() and somehow communicate this handle to your external application.


There are some examples around for this, it is the same PostMessage() call that is also used in the various period converter and renko offline chart scripts that are floating around.

 

https://forum.mql4.com/27050