Hello, I am new to mql language and would be thankful if anyone familiar with mql language can direct to good path for learning. What ways are there to make mt4 communicate to external soft? If trying to go with socket programming , would it be best to send string data or is it possible to use metaquotes language to convert incoming data to variables easyer? Best if possible to confirm all data is recived by both sides and run mt4 side effectively.
It's been a while since I last used mql, but believe with MT4 you'd need to use (or create) a DLL. You could look into: https://www.google.com?q=mt4+ShellExecute Personally, I'd look for a better solution.
If there is better solution for mt4 , also good if not very complex to implement. There may be dlls avalible that allow socket programming and it would be possible to run with mt4 but would it be running good on mt4 is good question. Could also be some easyer to program platform than mt4 but mt4 appears to be widespread and conditions seem good by brokers for small positions. Can you please describe idea , could also be other platform.
MT4 is fine until you run into its limitations, which it seems you have. So a better, more future proof solution could be a different platform altogether. But this is just my opinion. Which markets are you trading? Are you implementing your own EAs / indicators or are you doing something else? What is the external software you want to interface with, and what do you want to achieve? Are you a competent programmer in a language such as C/#/++, Java, etc? There are others in the Programming forum who are better qualified to answer your questions. Hopefully they will appear.
There is a Zorro DLL, the MT4 bridge that connects MT4 to other applications. It has a simple interface to transfer prices and trade orders. It's for Zorro, but it can be used by any software that can call DLL functions.
Have been passively , by alarms , trading forex for 5-7 years on mt4 and other types of markets mostly on ninjatrader historical playback but there is no auto time speedup on weekends. It is c/c++/opengl based lightweight graph program with built in tester configurator that can work with historical data. Also possibility to manually set non linear stop loss and buy/sell auto execution lines and alarms. It would be enough if could sync current and historical price data from trading platforms and add/change pending orders with stop loss while confirming conditions are good and spreads not too agressive. Can try to make socket programming so its easy to implement in other platforms.
MQL4 documentation does not seem to have lot to say about dll importing and possibilitys. If would try to write dll that uses networking libraries is there potential it will work if included to mt4 compiler? It seems mt4 can call functions in dll but could dll also call mt4 somehow or mt4 would need to run continious loop to check events?
MT4 needs to run a loop in an EA for answering events. You can find an example of such a loop in the source of the mentioned Zorro/MT4 bridge DLL.
Thanks for all info , Is it more flexible to make ea or script in mql? Ea appears to execute on ticks od new data.