You can apply a Hotkey to a script by right-clicking it in the "Navigator" panel and choosing "Set hotkey" on both MT4 and MT5.
Thanks Fernando for the reply.
I know how to set the hotkeys, but I want the scripts to work through an EA. Not sure how to make that connection.
Why complicate things? Just make a single EA with the functionalities of the various scripts and just monitor the keystrokes from the OnChartEvent() handler in order to trigger each functionality. You can also use a panel or dashboard to click on instead of keystrokes.
Why complicate things? Just make a single EA with the functionalities of the various scripts and just monitor the keystrokes (or a dashboard or panel) in order to trigger each functionality.
Hi Fernando,
Not sure how to monitor the keystrokes as you have mentioned. Please explain. Thanks.
Why complicate things? Just make a single EA with the functionalities of the various scripts and just monitor the keystrokes from the OnChartEvent() handler in order to trigger each functionality. You can also use a panel or dashboard to click on instead of keystrokes.

- www.mql5.com
There are several examples of trading panels in the CodeBase. Here is one I found available on both MT4 and MT5, but there are more, so run a search.
There are several examples of trading panels in the CodeBase. Here is one I found available on both MT4 and MT5, but there are more, so run a search.
Thanks Fernando. Will check these out. Appreciated ;).
Hi again Fernando. Not sure I want the control panel/dashboard as it seems as though details still need to be entered. I want the trades to be executed once the hotkey is pressed on the keyboard. I am thinking the OnChartEvent is the way to go. The handler may be the connecter. Will work with it and see if I can make it happen.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi Everyone,
I am new to coding and would like to create an EA that would work with scripts that are triggered using hotkeys. These scripts would be placing and closing orders. I am not quite sure how the connections are to be made between the script and the EA to make that happen. Any assistance would be greatly appreciated. If anyone has any codes that would assist, they would be most welcome.
Thanks in advance for your help ;).