Pairtrading EA and Indicator 1 Installation 1) Take the Indicator Correlation file and paste it into your MT4 Indicator folder. a. You find the MT4 folders in your Program files, see example below b. C:\Program Files\FXCM MetaTrader 4\experts\indicators c. So simply copy and paste the file into the indicators folder 2) Take the EA PTL file and paste it into your MT4 Expert Advisor folder. a. C:\Program Files\FXCM MetaTrader 4\experts b. Again simply copy the file and paste it into the folder 3) Now open you MT4 program as normal 4) Take out a chart with the (highest number) Asset you want to pairtrade on a chart. I call this Asset A. For instance if the German DAX has 9600 points and the Swedish OMX only 1330 points the DAX should be your Asset A and the OMX you Asset B. This since it is much easier to work with a Indexfactor larger than 1,0. DAX/OMX = 9600/1330=7.21805 a. Once you have the DAX page open set the time frame on 1 min. 1 min it is not necessary, it is just something I prefer. b. Insert the Indicator in the DAX page. You find the indicator under custom indicators. Just drag and drop it into the chart. Then click OK. We will come back to the settings in chapter 2, Settings. c. Insert also the EA into the DAX page. You find the EA under Expert Advisors. Just drag and drop it into the page. Then click OK. We will come back to the settings in chapter 2, Settings.
2 Settings Now you have both the EA and Indicator on your DAX page. We will start with the settings. Settings Indicator Under common just choose it you want fixed minimum and maximum values. I recommend that you choose any suitable two values for the pair you want to trade. Sharper: This means the number of decimals for the Indexfactor. Example Indexfactor DAX/OMX=7.21805 are 5 decimals. I always use the number 5. Asset A: State your highest Asset as described before in installation. Please note that you have to spell it 100% correct. Asset B: State your Asset B Entry U1: Here you state the value for your entry Long Asset A and short Asset B
Exit U1: Here you state the value for your Exit (so called Take Profit) Entry D1: Here you state the value for your entry Short Asset A and long Asset B Exit D1: Here you state the value for your Exit (so called Take Profit) Entry Color: Here you can set your own colours for both case U (up=long) and case D (down=short). The entry lines will always be full lines and the exit lines will be dashed. Color Display: This is the colour for the text. I use white background charts and therefore I like blue text. Show lines: Should be set to true for all Colors: Here you choose the colour of the Indexfactor graph. I like to use dark green on my white chart background Now you can click OK and the Indicator settings are all done!
Settings EA Common: See picture above Sharper: This means the number of decimals for the Indexfactor. Example Indexfactor DAX/OMX=7.21805 are 5 decimals. I always use the number 5. Asset A: State your highest Asset as described before in installation. Please note that you have to spell it 100% correct. Asset B: State your Asset B Autotrade: Set this to true if you want you want the EA to trade automatically
Start & Stop: Start and stop time for your automatic trading. Please note to have the correct time from your MT4 broker charts and remember that different Assets open and close at different times. Important: You have to only set times when both assets are open for trade. If only one Asset is open and you have not set the time correct the EA can only open 1 leg of the Pair trade and you are not hedged. I normally even have a little extra margin at the opening and close. So if my Asset A opens at 7:00 and my Asset B at 8:00 I will set the Start time at 8:02. If my Asset A closes at 21:00 and my Asset B closes at 16:25 I will set close time at 16:22. As you see the one Asset that opens the latest and closes earliest is the one you have to follow. Lotsize A at U1: State your Lotsize for Asset A Lotsize B at U1: State your Lotsize for Asset B Lotsize A at D1: State the same as above. Please note, always use the same Lotsize as above in U1 Lotsize B at D1: State the same as above. Please note, always use the same Lotsize as above in U1 (I assume that you know that in Pairtrading you should have the same money amount for both legs Asset A and Asset B to have a perfectly hedged Pairtrade position.) (Calculate exactly so that Value Asset A*Lotsize Asset A = Value Asset B * Lotsize Asset B) In my example below 0.01 DAX = 0.65 OMX. I.e. they have the same money value. Sound Alarm: Here you can set if you sound for crosses of the Indexfactor graph Entry and Exit lines. You can also set sound for a trade. I personally do not use this feature and have set it to false.
Color Display: Here you can choose the colour for the text of the EA. I like to use blue since I have white background on my charts. Slippage: Here you can set max allowed slippage. My experience is that if you have a broker that has a lot of requotes it is good to have a rather large number. I use slippage setting to 10. Magic: Here you can set any number you want. This is important if you use the EA on more than 1 chart. You have to have unique numbers for each chart. Now you can click OK and the EA settings are all done! 3 Time to trade Now your chart should like this.
Look for the smiley in the upper right corner. Then you know that all the settings are made and that the EA is active. Trading Advice 1) Even if your Pairtrading gives you a hedged position you can still loose. If the Assets keep on diverging you will have a negative open position. Remember that there is only an Exit for both the case U (long) and case D (short) as a Take Profit. There are no Stop-Loss settings as this is normally not used in Pairtrading. If you feel that your trade continues to go in the the wrong direction you have to close the trade manually. Suitably by moving the Exit lines. Or by just setting the Autotrade to false and then closing each leg manually. 2) I prefer to enter into a Pairtrade in many small fractions, so called layering. For each layer I get a better entry price. Then when the Pairtrade moves back and forth I will get several profits. Remember to set different Magic numbers on each EA for each chart. 3) Important: Always try the Indicator and EA in different situations for exactly the Assets you want to trade in demo mode first. This way you make sure that everything is working as it should. 4) Enjoy Pairtrading wins: If you find good correlated assets and manage the settings correct Pairtrading can be very rewarding. Always keep focus on your risk and do not overtrade. Good luck with your Pairtrading! Disclaimer: The seller of the EA and Indicator takes NO responsibility for any kind of losses occurring from trading with the EA even if such loss should be caused by a malfunction of the EA or Indicator. The buyer/user has to make sure that the product works as supposed for the Assets he wants to trade and has to take full responsibility for their own trading results.