Discuss JavaParts services, ask for help with JavaParts products, be notified about product updates.
You are not logged in.
Hello,
We'are making a java application to get data from MT4 using DDE for Java... The connection with MT4 seems to be Ok, bue when we invoke the request with any item of MT4 ("EURUSD"), the response is "N/A".
We tested using DDE with Visual Basic and we got data without problems. MT4 is configurated ofr bieng a DDE server...
This is our code:
DDEClient client;
Conversation conv = null;
byte[] data=null;
client = DDEClient.getInstance();
try {
conv = client.connect("MT4", "BID");
System.out.println("Connected to MT4");
String Topic= conv.getTopic();
data=conv.request("EURUSD", 5000);
String sEURUSD = new String(data);
System.out.println("EURUSD value: " + sEURUSD);
} catch(DDEException e) {
System.out.println(e);
} finally {
// disconnect in a finally clause
try {conv.close();} catch (Exception e) {}
}
client.close();
Please helps us...
Offline
Try advice transactions instead of direct requests.
Offline