external program control

 
I have an external program that uses dde to obtain data from mt4... however in order to send data back to mt4 I have to have an ea running a loop to get the data back, even when there is no tick coming into that ea... my question is, is there a way for the terminal to receive dde commands? or is there some way a script or ea can be run from the command line? or is there another way to communicate from the external program to the terminal (ea)? The ea running a loop takes a lot of computer resources. . and eventually will hang the computer.