Download MetaTrader 5

Hotkey to start a script

To add comments, please log in or register
strontiumDog
292
strontiumDog  

Hello

I have a script I run every time I trade and so I want to make it quicker by assigning a hotkey to the attachment of that script to the focussed chart.  How can I do this?

Fernando Carreiro
2236
Fernando Carreiro  
Right-Click the Script on the Navigator Panel and select "Set hotkey"!
Alain Verleyen
Moderator
31597
Alain Verleyen  
strontiumDog:

Hello

I have a script I run every time I trade and so I want to make it quicker by assigning a hotkey to the attachment of that script to the focussed chart.  How can I do this?

See MT4 help.
strontiumDog
292
strontiumDog  

Thanks for the pointers chaps.  So in case anyone else stumbles on this (like I did myself a couple of weeks after getting distracted by alternatives), the way to call a script automatically:

1. Write your script

2. assign hotkey as above

3. Write an indicator which can call a hotkeypress using the Windows dll call keybd_event (documented elsewhere).

Now I've not done this yet, but that is a round-the-houses way of getting your indicator to call events otherwise limited to scripts (or EAs).


I've spent a while looking for a simple mql4 hotkey press from within an indicator, and the next one to try is https://forum.mql4.com/45662

To add comments, please log in or register