This thread is a study in mean/reversion, cointegration, whatever you want to call it trading. We use R which can receive realtime FX data from metatrader due to a special gift from 7bit. Here are the steps to installing it after download: https://sites.google.com/site/prof7b...on-integration
All files needed are attached, please see instructions below. I use the demo version, but you can also use the regular arbomat.ex4. In comparing the 2, I like Demo version better it just makes more sense to me.
A) PLEASE READ: I will not post rules on trading baskets, please see my update below and read through the thread to discover the best baskets to trade.
B) Rules for Arbomat:
The idea is to take a position at a major deviation level. This can be one of the horizontal demarcation lines, or some significant "whole" number like .002.
If Blue price line is:
below mean (middle horizontal line), then:
if sign beside the hedge number in upper left is: + = buy
if sign beside the hedge number in upper left is: - = sell
If Blue price line is:
above mean, (middle horizontal line), then:
if sign beside the hedge number in upper left is: + = sell
if sign beside the hedge number in upper left is:- = buy
EXIT: Should be ON OR CLOSE to the mean, being that this is mean reversion trading.
OPINION: If you see momentum and want to ride it out, look at the previous price action and see what happened. If there is a trend oscillating about a mean, you could get a few more pips.
C) I won't personally guarantee replying to every last question, especially if the information was previously given. I will ignore those messages.
D) As a favor: other thread members that are up and running, please help me with configuration questions. Thank you.
e) NO POSTING OF OUTSIDE LINKS TO COMMERCIAL PRODUCTS OR OFFER OF THEM OVER PM. FOREXFACTORY WILL SUSPEND/BAN YOU.
1. install R-2.15.0-win
Download/install R -> http://www.r-project.org/ then,
2. copy common_functions.mqh & mt4R.mqh into mt4/experts/include
3. copy mt4R.dll into mt4/experts/libraries
4. copy arbomat.mq4 into mt4/experts
5. open arbomat.mq4 with metaeditor,
6. edit #define RPATH "C:/Programme/R/R-2.11.1/bin/Rterm.exe --no-save" to appropriate directory in your pc (example of mine ... #define RPATH "C:\Program Files\RR-2.15.0\bin\i386\Rterm.exe --no-save")
7. restart your mt4
8. attach arbomat.mq4 to chart ....
(thanks to Begamer for writing down instructions)
Inspired by:
7bit, Ultimate6, FXEZ and Mediator -> http://www.forexfactory.com/showthread.php?t=262827
In the above example, on 4/26, I took those positions based on hedge ratios calculated by arbomat.
drawdown has never been bad on this hedge, never more than $500. The basket jumped huge this week though! now at $2,426.00 profit (minus swap fees).
See that standard deviation suddenly spike down towards 2? this looks like the inverse of my floating equity curve. Just a few days ago the basket was near breakeven, with the dollar movement really saw value shoot up. even though the hedge ratios change, they are just used for entry and the chart remains valid as long as you update it on the next trade.
I placed this hedge while experimenting with the Arb-o-mat (see signature). Wanted to know: if I hedge every major dollar pair like its telling me, can i eventually make money and not get huge DD? Answer: YES.
At the open of markets Sunday, I plan to close this basket and place a new one in the portions shown above from the arbomat indicator.
Premise: Dollar hedge ratios recommended by arbomat done near extreme standard deviation results in profitable trades with low drawdown.
Update 5/25/12:
Basket arb-o-mat_5.mq4 Order Entry EA by Sym
Note I haven't tested this yet but will start that next week.
you attach the EA to any 1h chart you want.
If you are going to trade a basket (i.e. USDCAD, EURUSD, GBPUSD) you have to attach the EA to only one of these 3 pairs.
From arbomat (TF of arbomat can be whatever you want) you read 3 values (i.e. 80, -100, -20) and you have to input these values into the 3 pairs window value, set the magic number for the basket and a target (if you wish). That's all.
You can manage different baskets simultaneously, but remember each basket must have a different magic number..
-Sym
Update 5/26/2012: The only difference between the demo and final arbomat version seems to be the intercept variable on the final release arbomat version. The demo seems to have the intercept on by default. You have to set it manually in arbomat.mq4 if using that version. All else seems to be the same so I may just take the demo down.
Update 5/27/12: Focusing on nzdusd / usdcad hedge in the coming days as we are at key deviation levels here. This pair shows exceptional cointegration. You will see memebers playing other pairs, it's a free world go for it, but the smart money hedger should take only the most cointegrated pairs trade.
Another basket trade possibility are all dollar pairs EXCEPT usdchf and nzdusd since these are correlated to their obvious eurusd / audusd counterparts.
Update: 5/30/2012: We now have a complete automated EA integrated with Arbomat that can be tested -> http://www.forexfactory.com/showthread.php?p=5710770#post5710770
Mediator -> http://www.forexfactory.com/showthre...42#post5711542 <- Big thread on this I'm reading now.
I will also be posting Mediator's code. Let's try to keep focus on finding cointegrated pairs/baskets that can be consistently traded in a strategic manner. Feel free to post any EA or indicators. Secondary focus after this will be testing the EA's: by xlitang/sym/mediator
Edit 6/9/12: See Donny's posts, he made an indicator for hedging every dollar pair looks to have some merit: http://www.forexfactory.com/search.php?searchid=2717773
All files needed are attached, please see instructions below. I use the demo version, but you can also use the regular arbomat.ex4. In comparing the 2, I like Demo version better it just makes more sense to me.
A) PLEASE READ: I will not post rules on trading baskets, please see my update below and read through the thread to discover the best baskets to trade.
B) Rules for Arbomat:
The idea is to take a position at a major deviation level. This can be one of the horizontal demarcation lines, or some significant "whole" number like .002.
If Blue price line is:
below mean (middle horizontal line), then:
if sign beside the hedge number in upper left is: + = buy
if sign beside the hedge number in upper left is: - = sell
If Blue price line is:
above mean, (middle horizontal line), then:
if sign beside the hedge number in upper left is: + = sell
if sign beside the hedge number in upper left is:- = buy
EXIT: Should be ON OR CLOSE to the mean, being that this is mean reversion trading.
OPINION: If you see momentum and want to ride it out, look at the previous price action and see what happened. If there is a trend oscillating about a mean, you could get a few more pips.
C) I won't personally guarantee replying to every last question, especially if the information was previously given. I will ignore those messages.
D) As a favor: other thread members that are up and running, please help me with configuration questions. Thank you.
e) NO POSTING OF OUTSIDE LINKS TO COMMERCIAL PRODUCTS OR OFFER OF THEM OVER PM. FOREXFACTORY WILL SUSPEND/BAN YOU.
1. install R-2.15.0-win
Download/install R -> http://www.r-project.org/ then,
2. copy common_functions.mqh & mt4R.mqh into mt4/experts/include
3. copy mt4R.dll into mt4/experts/libraries
4. copy arbomat.mq4 into mt4/experts
5. open arbomat.mq4 with metaeditor,
6. edit #define RPATH "C:/Programme/R/R-2.11.1/bin/Rterm.exe --no-save" to appropriate directory in your pc (example of mine ... #define RPATH "C:\Program Files\RR-2.15.0\bin\i386\Rterm.exe --no-save")
7. restart your mt4
8. attach arbomat.mq4 to chart ....
(thanks to Begamer for writing down instructions)
Inspired by:
7bit, Ultimate6, FXEZ and Mediator -> http://www.forexfactory.com/showthread.php?t=262827
In the above example, on 4/26, I took those positions based on hedge ratios calculated by arbomat.
drawdown has never been bad on this hedge, never more than $500. The basket jumped huge this week though! now at $2,426.00 profit (minus swap fees).
See that standard deviation suddenly spike down towards 2? this looks like the inverse of my floating equity curve. Just a few days ago the basket was near breakeven, with the dollar movement really saw value shoot up. even though the hedge ratios change, they are just used for entry and the chart remains valid as long as you update it on the next trade.
I placed this hedge while experimenting with the Arb-o-mat (see signature). Wanted to know: if I hedge every major dollar pair like its telling me, can i eventually make money and not get huge DD? Answer: YES.
At the open of markets Sunday, I plan to close this basket and place a new one in the portions shown above from the arbomat indicator.
Premise: Dollar hedge ratios recommended by arbomat done near extreme standard deviation results in profitable trades with low drawdown.
Update 5/25/12:
Basket arb-o-mat_5.mq4 Order Entry EA by Sym
Note I haven't tested this yet but will start that next week.
you attach the EA to any 1h chart you want.
If you are going to trade a basket (i.e. USDCAD, EURUSD, GBPUSD) you have to attach the EA to only one of these 3 pairs.
From arbomat (TF of arbomat can be whatever you want) you read 3 values (i.e. 80, -100, -20) and you have to input these values into the 3 pairs window value, set the magic number for the basket and a target (if you wish). That's all.
You can manage different baskets simultaneously, but remember each basket must have a different magic number..
-Sym
Update 5/26/2012: The only difference between the demo and final arbomat version seems to be the intercept variable on the final release arbomat version. The demo seems to have the intercept on by default. You have to set it manually in arbomat.mq4 if using that version. All else seems to be the same so I may just take the demo down.
Update 5/27/12: Focusing on nzdusd / usdcad hedge in the coming days as we are at key deviation levels here. This pair shows exceptional cointegration. You will see memebers playing other pairs, it's a free world go for it, but the smart money hedger should take only the most cointegrated pairs trade.
Another basket trade possibility are all dollar pairs EXCEPT usdchf and nzdusd since these are correlated to their obvious eurusd / audusd counterparts.
Update: 5/30/2012: We now have a complete automated EA integrated with Arbomat that can be tested -> http://www.forexfactory.com/showthread.php?p=5710770#post5710770
Mediator -> http://www.forexfactory.com/showthre...42#post5711542 <- Big thread on this I'm reading now.
I will also be posting Mediator's code. Let's try to keep focus on finding cointegrated pairs/baskets that can be consistently traded in a strategic manner. Feel free to post any EA or indicators. Secondary focus after this will be testing the EA's: by xlitang/sym/mediator
Edit 6/9/12: See Donny's posts, he made an indicator for hedging every dollar pair looks to have some merit: http://www.forexfactory.com/search.php?searchid=2717773
Attached File(s)
arbomat_demo.mq4
14 KB
|
2,351 downloads
|
Uploaded May 24, 2012 11:21pm
mt4R.mqh
12 KB
|
2,386 downloads
|
Uploaded May 24, 2012 11:22pm
py26.mqh
10 KB
|
2,074 downloads
|
Uploaded May 24, 2012 11:23pm
arbomat.mq4
16 KB
|
2,667 downloads
|
Uploaded May 24, 2012 11:27pm
Basket arb-o-mat_5.mq4
9 KB
|
3,945 downloads
|
Uploaded May 25, 2012 3:56pm
Skype: heliosphan187