How to send/receive data to/from MetaTrader Ternminal 4 with JAVA (or anything!)
<p>I have been working on an algorithm ( Not mine, I am just modifying it ) that predicts when to buy and sell on the FOREX market. I need to be able to open and close orders, dynamically update parameters of the orders ( such as stoploss, maximum stop etc. ) and receive real time tick data.</p>

<p>I have been researching for well over a week, and have no success.</p>

<p>The closest I have gotten is using <a href="https://www.javonet.com/" rel="noreferrer">JavoNet</a> and <a href="http://mtapi4.net/" rel="noreferrer">Mt4 Api</a></p>

<p>I managed to import the DLL into java and use a MQL4 function, which was <code>AccountBalance()</code>, however this has returned <code>0.0</code>, which was not the account balance, I messed around with the code and the settings on MT4 client but still no luck.</p>

<p><strong>Q0:</strong> Can anyone please point me in the right direction?</p>

<p>I am new to automated FOREX trading but from what I understand there is a broker somewhere with a MT4 server and I connect to that server with my MT4 client on my windows machine.</p>

<p><strong>Q1:</strong> If this is the case, do I need to make an API work with the server side instead of my client side?</p>

<p>All these DLL's I have tried so far have been used with the MT4 client software on my machine.</p>

<p>I have also been doing some reading on the FIX-Protocol and ZeroMQ.</p>

<p><strong>Q2:</strong> Can these help me achieve my goal in any way (instead of creating some bridges between JAVA and MT4 DLL's)?</p>