AutoHotkey for MetaTrader 4 signal to IQ Option

This bot is just a simple tool to get signal from your MetaTrader 4 then click Put or Call on your IQ Option software accordingly. 

As for my limited knowledge, the most simple solution to access both and can simply be coded was using the clipboard. The idea was to simply designate a letter to the clipboard from MetaTrader 4 script when a signal happen then AutoHotkey script will detect the clipboard and execute according to the signal. 

The problem with this is you cannot use the clipboard or copy something while the AutoHotkey script is running. As long as you do not use the clipboard, you can still use your computer. 

What do we need?

AutoHotkey and MetaTrader 4 will be our software for this or you can use your own MetaTrader 4 broker as long as the tick data was almost identical to IQ Option. Personally I use FXCM as my broker.

How to set it up?

First, AutoHotkey and MetaTrader 4 must be installed then download or right click and save my AutoHotkey script (myBot.ahk) and Metatrader 4 EA. (myStrategy.mq4)

Save the AutoHotkey script anywhere you like and Metatrader 4 EA to MQL4\Experts of your MT4 installation folder.

We will now set the coordinates of the X and Y of Call and Put button in the AutoHotkey script.
  • Open Active Window Info (Window Spy) and the IQ Option program. The IQ Option program must be the active window then hover your mouse cursor to the CALL button.
  • Make sure that IQ Option is in Window Title then write down the Relative value of Mouse Position. Example below was "Relative: 1307, 440" which means X is 1307 and Y is 440.
  • Just like the procedure in CALL, do this also in PUT button. Hover your mouse to the PUT then write down again the X and Y.

Edit the value of variable "callx", "cally", "putx" and "puty" in your AutoHotkey script (myBot.ahk). The default character of what the script will detect in the clipboard was "a" for call and "b" for put. You can change it whatever you want but make sure that it what equivalent to the settings of the MT4 EA or else the script won't work.


Next is open your MetaTrader 4 program then attach the EA (myStrategy.mq4) to the chart of your choice. Of course it must be the same with the chart on your IQ Option. In your MetaTrader 4, make sure that the "Allow DLL Input" was checked as it will be needed for the clipboard to work.

Once attached you can now run the AutoHotkey script (myBot.ahk) and wait for the signal.

The example strategy on this guide was a simple Parabolic SAR signal so don't use it on your real account or you will lose. It's just for demonstration purpose.
Reference for the function copy to clipboard was from https://www.mql5.com/en/forum/124802

Popular posts from this blog

iMacros for freebitco.in

iMacros for coinfast.win