HedgeMultiCorrelation needs help - page 2

 

good grief kokas!!! you been working on this a lot!! good job...a whole lot better than the original. i changed this line

Correlation= iCustom(NULL,0,"Correlation",Symbol1,Symbol2,20,0,0);

changed last number from 1 to 0. i think this means it looks @ current bar. now numbers are almost identical. off by .00#. so i don't think it really matters. again very nice job on this. will test it and report back!!

 

found something kokas. the settings for long and short do not work. we gonna have to add some more open order codes or maybe a setting like scenario 1 long/long, scenario 2 long/short, scenario 3 short/short

extern double Scenario = 1;

if(ScanOpenTrades()==0 && Scenario==1 && !StopManageAcc){

CloseSignal=false;

OrderSend(Symbol1,OP_BUY,Lots1,MarketInfo(Symbol1,MODE_ASK),3,0,0,comment,Magic,0,Blue);

OrderSend(Symbol2,OP_BUY,Lots2,MarketInfo(Symbol2,MODE_ASK),3,0,0,comment,Magic,0,Blue);

something like this. but it late now and need to go to bed for work in AM will test and be back after work'

 

ok think i fixed the long/short options. test this one and see. looks good so far in testing.

Files:
 

MoneyManagement

So, now we have got to add MM functions to the EA. On the comercial version, it uses a daily function to get swap returns invested. My idea is a little diferent. Everytime a pair is closed that earning is used on another subhedge. This is a dificult task to code, let's see. One important fact is that maximum loss must be very high I have to check if set 0 the EA does not use this function.

I've found this article very good on correlation and hedging strategies.

 

EA doest not load on GBPUSD

Some Setups to Test:

PAIR ONE

GBPUSD Long / USDCHF Long

Profit Target : 200

Use Pips : True

MaxLoss : 0

Use Correlation : True

PAIR TWO

GBPJPY Long / CHFJPY Short

Profit Target : 200

Use Pips : True

MaxLoss : 0

Use Correlation : True

 

what sort of time frames you gonna test. im trying the 1 min on lots of pairs with and without correlation filter. i will look at mm on other ea and see if i can work into this 1. not sure though i think my coding luck may run out soon

 

Correlation Indicator

I hope that you could figure out how correlation indicator works.

I'm not sure by now... I always thought that a correlation of:

+1 - Currency move on the same direction

0 - Random movment between currencies

-1 - Currencys move on opositte direction

I do not know if this is complety true on this indicator. Maybe Igorad may help us here.

We also have to make some tests when using correlation to what is the best entry for each setup.

Also remember that if you use Interbank with mini account the symbols must be EURUSDm for Euro etc...

 

What is expected from an EA

Usualy there are some aspects that are always expected from any EA:

1 - Fully automated

2 - Turn out a small account on a big account with no risk involved

3 - Good Money Management to keep the risk low

4 - Avoid margin calls

5 - Good returns in shot time frame

Well, this is all we can achieve with this EA, but as all of you know me and cturner are not experts on coding so we need all your help to code our ideas for this EA. As it is now, you can use it on your account (I personaly am testing it real on IBFX with 0.2 mini lots since friday, so lets see how it will perform this week).

Usually hedge strategies requeires large accounts, because if you use very good correlated currencies they will move together and you only get profit from swap. This is very true on GBPJPY long and CHFJPY short. If you have a large account you can bet that you will get great profit with this EA.

But there are some aspects that we need to add to the EA, like double hedge strategie, that consistes on monitor two oposite pairs (forget swap on this case it will be nulled at the end). This stategies must be used with two pairs that do not correlate so well as the above, so in divergence periods we can close the hedge in profit and reopen it, and leave the other untouched. Eventually the trend of the hedge will change and the other pair will be on profit. This double hegde can be done just adding the EA to two charts with crossed parameters. So no big deal on this one.

Regarding Money management.. how this can be done in hedging, using only one pair? This is not so linear I think. The idea is to change the lot size with changes on the balance (if the EA is running alone on that account), or equitity, (if you are running multiple EA's on the account).

I know that many of you are looking for shot term long profits EA, but you must evaluate this one and spend some time with it.

Hope this will bring more people to our thread...

 

i start a demo original settings

thanks Kokas and cturner

hedge ea v2.2

 

Che,

the default values are not so good for this ea... our mistake. We must use for this two currencies that have big diferences on swap like:

Symbol1: GBPJPY

Symbol1is long: TRUE

Symbol2: CHFJPY

Symbol2is long: FALSE

UseSwap: TRUE

UseCorrelation: TRUE or FALSE This must be tested and understand