HedgeMulti EA-Coding Help Please - page 2

 
waltini:
It seems we have three similar threads which have started at the same time.

If the others are happy perhaps we could combine them into one.

One has been started by Harryhid and has progressed further than mine.

www.forex-tsd.com/expert-advisors-metatrader-4/3498-buy-gbp-usd-sell-euro-usd.html

The other is by Kamyar.

www.forex-tsd.com/expert-analysis/3507-hetro-pair-hedging-ea.html

Shall we start a new thread or join in?

waltini

I am unable to access the 2nd link. Is that in a restricted area?

 
Snuffleupagus:
I am unable to access the 2nd link. Is that in a restricted area?

Hi Snuff, glad to see you here too. Yes, the 2nd link is refer to thread on an Elite Section, a paid one. Hope this help

 
firedave:
Hi Snuff, glad to see you here too. Yes, the 2nd link is refer to thread on an Elite Section, a paid one. Hope this help

Thanks for the help. I have been curious about that section.

 
boxingislife:
i agree

i made 200 pips this week trading correlation swings on usdjpy and usdchf

also traded usdchf and usdcad

plenty of others could be traded

very doable

What settings/EA are you using for this?

 

i dont use ea

i check the correlation and the spread between 2 positively correlated pairs and trade when the spread is low or high. buy one sell the other or vice versa

its basically trading a cross. like in usdchf and usdjpy basically its trading chfjpy. but with trading 2 pairs to be honest its just a psychological thing. i prefer it rather than trading one pair. its not any safer than trading the cross. it could work well with pairs like eurusd and gbpusd because eurgbp doesnt move much but ur better off trading eurgbp.

its nothing but an alternate to trading crosses.

 
waltini:
The EA attached is my attempt to recreate a popular hedging ea. I am not a coder and the ea doesn't work properly. I have used IgorAD's MultiPositionExpert as a starting point. See this thread www.forex-tsd.com/expert-analysis/3326-equity-ea-anyone.html?highlight=equity+ea

The aim of the ea is to open two opposing positions in two correlated currencies, wait till the correlation swings in your favour and the ea will close the two trades at a profit. The ea will detect that the positions have been closed and immediately re-open two new positions.

There are numerous strategies involving positive swap pairs and correlation indicators who will benefit from the ea. Johnboy suggested taking both sides of correlation, 1.buying GBPUSD selling EURUSD

2.selling GBPUSD buying EURUSD

so that the correlation swings back and forth you will be always making some pips.

If a coder amongst us could have a look at the code and make it work, hopefully any traders who like this style of trading will be able to benefit.

This is a link to an overlay chart of the GBPUSD & EURUSD(hourly) so you can get an idea how these two pairs look.

www.futuresource.com/charts/charts.jsp?s=FXEUUSMUL&o=FXBPUSMUL&a=V%3A60&z=800x550&d=medium&b=bar&st=

waltini

I was testing HedgeMulti_v1.mq4 in my FXDD demo account.

I ran into an issue today. It hit the profit target I specified in the EA and closed the hedge like it should. It opened another hedge pair as it should, but then it closed that quickly. So then it opened another....and closed that too. It ended up closing a total of 4 hedges before it should, one after another. So I detached the EA from the chart to stop the cycle.

During the closing of each hedge (gbpusd & eurusd) it seemed to leave eurusd open last on each one. I had to manually close eurusd once because it stayed open for awhile and I didn't want it unhedged. Doing that just caused it to open a hedge. Anyway, maybe there is something wrong in the code that causes it to get caught in that cycle.

That's the only issue I have found so far.

BTW, I like the feature in this EA that shows the total $ and pips on the chart.

 

i had same issue with reaching target then closing. opening new orders and closing them immediately.

 

Boxingislife,

Can you explain in a little more detail what you're doing? Thanks.

boxingislife:
i agree

i made 200 pips this week trading correlation swings on usdjpy and usdchf

also traded usdchf and usdcad

plenty of others could be traded

very doable
 
igorad:
Hi, I think correlation indicator will be useful.

How do I use this? I attached it to a chart but it is not displaying anything ??

Thanks

 

what are the rules for using correlation indicator ??

Reason: