Having metatrader place a trade from an outside program

 
I am writing a little program in C# that is designed to get currency movement data from metatrader (via its DDE server), analyze that data, make a market prediction, and then send a request to metatrader to buy or sell a particular currency.

I am having a little trouble having Metatrader place trades and I was wondering if anyone could give me any advice as to how this might be accomplished or if it is even possible. Any advice or assistance would be great as I have hit a bit of a wall - thanks
 
You can use dll's or write trade signals into file in folder ...MetaTrader 4 \experts\files\
See also https://www.mql5.com/en/articles/mt4
Reason: