Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

System to hedge every major dollar pair for profit/low DD

author EAcpu | 4 reads | 0 comments |
This article is about the study of mean/reversion, cointegration, whatever you want to call it trading. Thanks to a special gift from 7bit, we use R, which can receive real-time forex data from Metatrader. After downloading, the installation steps are as follows: https://sites.google.com/site/prof7b...on-integration







The idea is to open a position at the major deviation level. This can be one of the horizontal dividing lines, or some significant "round" number, such as 0.002.

If the blue price line is:
Below the average (middle horizontal line), then:

If the symbol next to the hedging number in the upper left corner is: + = Buy If the symbol next to the hedging number in the upper left corner is: - = Sell

If the blue price line is:
Above the average (middle horizontal line), then:

If the symbol next to the hedging number in the upper left corner is: + = Sell If the symbol next to the hedging number in the upper left corner is: - = Buy

Exit: Should be at or near the mean as this is a mean reversion trade.

Viewpoint: If you see momentum and want to ride out the storm, look at the previous price action to see what happened. If the trend fluctuates around the mean, you may get more ideas.





1.Install R-2.15.0-win
Download/install R -> http://www.r-project.org/ Then,
2. Copy common_functions.mqh and mt4R.mqh to mt4/experts/include
3. Copy mt4R.dll to mt4/experts/libraries
4. Copy arbomat.mq4 to mt4/experts
5. Open arbomat.mq4 using meta-editor,
6. Edit #define RPATH "C:/Programme/R/R-2.11.1/bin/Rterm.exe --no-save" to the appropriate directory on your computer (my example... #define RPATH "C:\Program Files\RR-2.15.0\bin\i386\Rterm.exe --no-save")
7. Restart your mt4
8. Attach arbomat.mq4 to the chart....
(Thanks to Begamer for writing the explanation)

Inspired by:
7bit, Ultimate6, FXEZ and Mediator -> http://www.forexfactory.com/showthread.php?t=262827

Attached picture (click to enlarge)
Click to Enlarge

Name: EVERYTHINGBITCH.jpg
Size: 99 KB

Attached picture (click to enlarge)
Click to Enlarge

Name: usd-basket.jpg
Size: 39 KB


In the above example, I held these positions on April 26 based on the hedging ratio calculated by arbomat.

In this hedge, the drawdown was never severe and never exceeded $500. However, the basket has seen huge gains this week! The profit is now $2,426.00 (minus the swap fee).

See the standard deviation suddenly drop to 2? This looks like the inverse of my floating equity curve. Just a few days ago, the basket was just about breaking even and really saw a surge in value as the US dollar moved. Even if the hedging ratios change, they are only used for entries and the chart will still be valid as long as you update it on your next trade.

I placed this hedge (see signature) while experimenting with Arb-o-mat. Wondering: if I hedge every major USD pair like it tells me to do, can I end up making money without getting a huge DD? Answer: Yes.

When the market opens on Sunday, I plan to close this basket and place a new basket into the section shown by the Arbomat indicator above.

Premise: arbomat recommends USD hedging ratios close to extreme standard deviations, resulting in profitable trades with low drawdowns.

Updated on May 25, 2012:
Order entry EA for basket arb-o-mat_5.mq4 Sym

Note that I haven't tested this yet, but will start next week.

You can attach the EA to any 1 hour chart you want.
If you want to trade a basket of currencies (i.e. USDCAD, EURUSD, GBPUSD), you only need to attach the EA to one of these 3 currency pairs.
From the arbomat (the TF of the arbomat can be whatever you want), you read 3 values ​​(i.e. 80, -100, -20) and you have to enter these values ​​into 3 pairs of window values, setting the magic number for the basket and the target (if you want). That's all .
You can manage different baskets at the same time, but remember that each basket must have a different magic number.
-symbol

Update May 26, 2012: The only difference between the demo version and the final arbomat version appears to be the interception variables on the final release arbomat version. The demo appears to have interception enabled by default. If using this version, you must set it manually in arbomat.mq4. Everything else seems to be the same, so I'll probably remove the demo.

Update 27 May 2012: Focus on the nzdusd/usdcad hedging over the next few days as we reach key bias levels. This pair shows excellent cointegration. You will see members playing other currency pairs, it's a free world, but a smart currency hedger should only trade the most cointegrated currency pairs.
Another basket trade possibility would be all USD pairs except USDCHF and NZD, as these pairs are correlated with their clear EURUSD/AUDUSD.

Update: May 30, 2012: We now have a fully automated EA integrated with Arbomat and ready for testing -> http://www.forexfactory.com/showthread.php?p=5710770#post5710770

Mediator -> http://www.forexfactory.com/showthre...42#post5711542 <- I'm reading a big post about this right now.

I'll also post the code for the Mediator. Let’s try to focus on finding cointegrating currency pairs/baskets that can be traded consistently in a strategic manner. Please feel free to post any EAs or indicators. The second focus after this will be testing the EA: Author: xlitang/sym/mediator

Edited June 9, 2012: See Donny's post where he developed an indicator for hedging every USD pair, which seems to have some merit: http://www.forexfactory.com/search.php?searchid=2717773
EVERYTHINGBITCH.jpgusd-basket.jpgGC2M_SI2M.pngNU.jpg
EVERYTHINGBITCH.jpgusd-basket.jpgGC2M_SI2M.pngNU.jpg
EVERYTHINGBITCH.jpgusd-basket.jpgGC2M_SI2M.pngNU.jpg
EVERYTHINGBITCH.jpgusd-basket.jpgGC2M_SI2M.pngNU.jpg
EVERYTHINGBITCH.jpgusd-basket.jpgGC2M_SI2M.pngNU.jpg
EVERYTHINGBITCH.jpgusd-basket.jpgGC2M_SI2M.pngNU.jpg

Original post attachment (5)

📦 Summary of post attachments (38)

Below are all the files (38) shared in the reply.

Verification code Refresh