Helping with a code of a Hedge EA

To add comments, please log in or register
edbeleg
80
edbeleg  

Can someone help me with a code?

I have download a Hedge EA from this site named: OverHedgeV2.mq4. The EA works very well only I have 1 code in it, I'm not so happy with. 

That is the hedge code of doubles. Now, with each hedge, the EA doubles the lotsides. Example: each trade, after the start trade, double. So first trade 0.10, second trade 0.20, third trade 0.40 etc. 

But I want a hedge to double with the start lotsides. Example: if the first trade starts with lotsides 0.01 then each hedge has to get the lotsides 0.02.

I do not manage to come up with an MT4 code.

Does anyone know what code I should change and what the code is?

of course, good suggestions for the total ea are always welcome

Icham Aidibe
11341
Icham Aidibe  
edbeleg:

Can someone help me with a code?

I have download a Hedge EA from this site named: OverHedgeV2.mq4. The EA works very well only I have 1 code in it, I'm not so happy with. 

That is the hedge code of doubles. Now, with each hedge, the EA doubles the lotsides. Example: each trade, after the start trade, double. So first trade 0.10, second trade 0.20, third trade 0.40 etc. 

But I want a hedge to double with the start lotsides. Example: if the first trade starts with lotsides 0.01 then each hedge has to get the lotsides 0.02.

I do not manage to come up with an MT4 code.

Does anyone know what code I should change and what the code is?

of course, good suggestions for the total ea are always welcome

Hi !

First let me welcome you in the great hedge brainstorming family ! So as you can guess the author didn't make the lot size double to seem funky, it's justified so : 

  1. Buy 0.01 ---> -100 pts 'til stoploss
  2. Sell 0.02 from -50 to -100 = 50*2 = 100

Here's the classic scheme : 

If you don't want to increase the lotsize, you'll have to assume it otherwise. 

Here's start the brainstorming. Good luck dude ! 



edbeleg
80
edbeleg  
Icham Aidibe:

Hi !

First let me welcome you in the great hedge brainstorming family ! So as you can guess the author didn't make the lot size double to seem funky, it's justified so : 

  1. Buy 0.01 ---> -100 pts 'til stoploss
  2. Sell 0.02 from -50 to -100 = 50*2 = 100

Here's the classic scheme : 

If you don't want to increase the lotsize, you'll have to assume it otherwise. 

Here's start the brainstorming. Good luck dude ! 



Tnx for your help.

I am working on creating a hedge EA that follows the following rules.

1

This EA applies the most rules only must be tightened up in areas.

I think hedging is the best way to have an EA run automatically. After all, you can not predict the market just respond to it.

What do you think about my ideas about hedging?

Icham Aidibe
11341
Icham Aidibe  
edbeleg:

Tnx for your help.

I am working on creating a hedge EA that follows the following rules.

This EA applies the most rules only must be tightened up in areas.

I think hedging is the best way to have an EA run automatically. After all, you can not predict the market just respond to it.

What do you think about my ideas about hedging?

Logically if you don't recover using only lot size, you'll have to recover considering points, but ... with a smaller canal ? [+100;-100]

  • Buy 0.01 TP +100 - SL -100 
  • H1 : Sell @ -50/0.02 until TP (-50*2=+100) & SL +50 (>0:2*50=100 + <0:2*50 = -200(sell)) + first one 50*1 = -150
Can you detail please ? 


edbeleg
80
edbeleg  
Icham Aidibe:

Logically if you don't recover using only lot size, you'll have to recover considering points, but ... with a smaller canal ? [+100;-100]

  • Buy 0.01 TP +100 - SL -100 
  • H1 : Sell @ -50/0.02 until TP (-50*2=+100) & SL +50 (>0:2*50=100 + <0:2*50 = -200(sell)) + first one 50*1 = -150
Can you detail please ? 


this is primarily a theoretical model. I do not use a stop-loss here because the hedge is used for this. The ea hedge each time until the TP is hit and everything is closed at once.

Now the ea should look at the total basket of everything trades to close at a positive tp.

It does not matter which way the trade goes. Or the trade hits the tp and closes with a profit, or the trade is hedged and a new tp is created in the opposite direction.

Now my question is, can this construction?

Papa Prabu
22
Papa Prabu  
edbeleg:

Tnx for your help.

I am working on creating a hedge EA that follows the following rules.

This EA applies the most rules only must be tightened up in areas.

I think hedging is the best way to have an EA run automatically. After all, you can not predict the market just respond to it.

What do you think about my ideas about hedging?

i have edit old ea to works just like your rule..

but it dificult to make profit.

since the more hedge position occur we should raise the TP to make profit.

here i sent you the ea. hopeyou can make me understand how to make it profitable.

to close all OP i use SL. so when it reach TP it will also reach SL and close all

i set TP 15 and distance 10 for now

all we do is playing this TP & Distance


waiting for your good advise

<ex4 file removed>
Keith Watford
Moderator
15013
Keith Watford  
Please attach mq4 files only.
Papa Prabu
22
Papa Prabu  
Keith Watford:
Please attach mq4 files only.

ok sorry my mistake 

thanks moderator

To add comments, please log in or register