this EA has been tested with Exness. You need a broker who offers offset hedges. Broker compatibility: The EA calls currency pairs like “AUDUSDm”. Replace the “m” in the EA with your brokers code.


The InsomiaFX Correlation Double Hedge EA system works this way:

AUDJPY/CADJPY have a correlation of around 90% over 1 year which is good. Over the day it changes quite a bit.

  1. Open a 100.000 USD demo account
  2. Attach EA to AUDJPY chart, timeframe doesn’t matter

EA will do:


  1. Open hedged AUDJPY/CADJPY (2 orders – Pair 1)
  2. Open the same orders opposite side (Pair 2), margin is now 0 and we have a .. hmm .. correlated double hedge ! winking2 InsomiaFX Correlation Double Hedge EA


With margin 0 we have a very nice buffer for drawdowns plus we double the chance to reach the TP due to two Pairs. Just swap is negative.

For example each order is 40 lots and TP (Take Profit) point of 1000 USD per pair.

Profit will be taken once the correlation goes wild and a pair reaches the TP. Like one order is -1000 and the other +2000. This pair will be closed and recreated. This happens around 5-10x per day.

The drawdown will stop automatically at a maximum due to the double hedge. In this example not more than 20% or so.



Very nice interactive correlation charts:



Swap loss per day around -80 USD with 40 lots per order. If you disable Pair 2 and thus pay margin for Pair 1, the Swap turns into a profit of ca. 120 USD per day or around 3000 USD/month. Pair 1 still will take the 1000 USD TP whenever reached. happy5 InsomiaFX Correlation Double Hedge EA

Things to do:


  1. Check the EA for bugs
  2. Test the system if it makes any long-term sense ?
  3. Add correlation formular to EA (mostly done)
  4. Define perfect order entry points based on correlation of last X min
  5. Add lot based compound related to Equity gain to boost this up.


As AUDCAD swings around 8% per last 2.5 years I added code to adjust the lot size based on the same USD value for each pair. However I found the correlation differences per day is up to 50% per pair so it has little effect to adjust the lot sizes now. So that code is inactive. With AUD/CAD around 1.00 just place same lots.

I have it running on 4 Demos since today to check if this system works and find code/logic bugs.

See the pairs shown in the comment and profits in points. Fun to see how the points change around till they hit the TP.

Attached Image (click to enlarge)

 InsomiaFX Correlation Double Hedge EA


Thx for reading and any feedback.



Note: The rar contains a dll which simply boosts the MT4 process priority to high. Its not needed if you don’t trust DLLs. Just uncomment the related code in the EA. If you like to use it, put the dll into the same folder as terminal.exe. Needs Windows 7 and .NET Framework 4.0. Source on request.

Attached File

rar1 InsomiaFX Correlation Double Hedge EA InsomiaFX_Managed.rar   9 KB | 27 downloads
Attached File
mq413 InsomiaFX Correlation Double Hedge EA InsomiaFX_Demo.mq4   10 KB | 17 downloads