Coding a DLL for MT4
MQL is by itself a very powerful programming interface, especially compared to the many other trading software out there who have limited programing capabilities ( though the trend is changing ). Yet MetaTrader still offers us the ability to program our own dlls.
Now, I may be wrong but until someone corrects me here are a few things to know about writing DLL's for MT4.
1) You have to write the DLL using C++/Delphi, NOT VB, NOT C#...
2) You MUST have a def file, in visual studio it needs to be created manually, if using dev-c++ it will be generated for. I would say 70% of the problems one has with dll's in MetaTrader is error 127. This error means that you either do not have a def file or that the def file is not set properly.