Hotkey to start a script

 

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?

 
Right-Click the Script on the Navigator Panel and select "Set hotkey"!
 
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.
 

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

Reason: