I am currently programming an EA using java/JDK/intelli J. I am able to create a connection between the server and MT4 but it keeps kicking me out saying that it is an invalid password and username. Do I use the MT4 password and username or my oanda username?!
MQL EA is just MT4 based and my robot would go through the gateway to the actual server.
I had to set up a separate account for MT4 trading. But, that's so easy.
If your EA is launched by MT4 it doesn't need a password, at least I don't. So, have you tried using your code as a function, let's say, and then call that in a .mq4 wrapper? Compile and attach that. If you are not showing the server a .ex4 file, that's a problem, I think.
But, I could easily have it wrong, what you are trying to do. More details?