Hello! I saw an expert adviser, that was used as an API. It provides connection, so you can use your own program for trading, and post commands to MT4 trough such EA. I don't have source code, just know that some windows libs were used to create it, ...