Hi, I'm relatively new to MT4, but I have some basic experience now. I'm looking into creating some DLL which I can use in my EA. However, it'd be natural for me to be able to call functions provided by either the platform (ie. AccountEquity() ), or MQL4 code from the DLL. I've googled around for quite a while, but couldn't find a clear answer as to this is possible or not. Anyone?
- Calling DLL linked to another DLL from Custom Indicator, Is this possible?
- How to fix Unresolved import call: Cannot find Add in TestMe.dll in MQL4
- My Advisor with my Custom indicator not showing on chart
Unfortunalety not possible. This is the biggest design flaw of the whole mq4 language. And as far as I know it also wont be fixed in mql5.
The only thing you can do is trigger the start() function by sending a fake tick to the chart via PostMessageA() from the windows API even if the market didn't move. So you can at least wake up your EA whenever you want and let it poll some kind of command queue you have set up in your DLL.
The only thing you can do is trigger the start() function by sending a fake tick to the chart via PostMessageA() from the windows API even if the market didn't move. So you can at least wake up your EA whenever you want and let it poll some kind of command queue you have set up in your DLL.
Crazy... Somehow I guessed that I'd have to employ gross hacks to achieve what I want to do. However, I only want to operate on regular start() 's, but still I guess I can't call back from there into the platform.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register