Is there a way to communicate with MT5 with an external application?
For example, I would like to command MT5 to close a trade via an external application.
I was thinking of getting the chart window handle and then use this window handle to do a SendMessage(hWnd...) or PostMessage(hWnd...) to the chart window via the external app. But is there a better way?
One would have thought the MT5 has built in event polling capabilities, but I haven't seen these. Any novel ideas?
Thanks.
Documentation on MQL5: Standard Constants, Enumerations and Structures / Chart Constants / Chart Properties
- www.mql5.com
Standard Constants, Enumerations and Structures / Chart Constants / Chart Properties - Documentation on MQL5
- Download the MetaTrader 5 mobile app for Android
- MQL5 Wizard: Development of trading robots for MetaTrader 5
- Payments in MetaTrader 5
Your approach is not bad.
Another aporoach to write to registery from your appication and make an EA that reads the registry.
olddirtypipster:
Is there a way to communicate with MT5 with an external application? For example, I would like to command MT5 to close a trade via an external application. I was thinking of getting the chart window handle and then use this window handle to do a SendMessage(hWnd...) or PostMessage(hWnd...) to the chart window via the external app. But is there a better way? One would have thought the MT5 has built in event polling capabilities, but I haven't seen these. Any novel ideas? Thanks.
Is there a way to communicate with MT5 with an external application? For example, I would like to command MT5 to close a trade via an external application. I was thinking of getting the chart window handle and then use this window handle to do a SendMessage(hWnd...) or PostMessage(hWnd...) to the chart window via the external app. But is there a better way? One would have thought the MT5 has built in event polling capabilities, but I haven't seen these. Any novel ideas? Thanks.
Better way ? using WinAPI like that (PostMessage... SendMessage) is better than other method.
OnTimer event calling .dll or some file in each second, could be an alternative.
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