• Join us

Hedge saved you, who will save Hedge ? - page 15

Rafael Grecco
495
Rafael Grecco  
Ahmad Zuhairdi Noh:

Well, in my opinion, by using OrderProfit() you will have better control towards equity instead of using Pips or Pts. You can decide how many percents to risk and how many percents to gain by referring directly to the AccountEquity()

Like "USDRUB : 6193 pts 0.01 lots = 1 USD". Sure it does look it needs a big pts compare to EURUSD but in a chart, if you measure it using crosshair, 6k pts is like a drop in the sea. 

Well, of course, you are free to use any style you familiar with.

That's exactly what I am currently using, everything based on equity risk. This way the EA can be used on any pair without adjustments.

The problem is that if the  hedge strategy uses a trade zone (x pips above/below), which I believe is what Icham is currently using, it can't be done using OrderProfit.

Ahmad Zuhairdi Noh
2298
Ahmad Zuhairdi Noh  
Rafael Grecco:


It can't be done using OrderProfit.

Well, I know you don't literally mean it didn't you? As a matter of fact, it sure is possible and I've done it before.

Let create an example here for sake of other readers who still learning.

Lets use the following sequences: 0.01,0.02,0.03,0.05 and 0.08 with maximum 5 loops. The deposit is $1000 and 10% risk mean $100.

1st trade: Buy (0.01)

2nd trade: Sell (0.02)

3rd trade: Buy (0.01+0.03 = 0.04)

4th trade: Sell (0.02+0.05 = 0.07)

5th trade: Buy (0.01+0.03+0.08 = 0.12)

If the last trade (Buy with lots 0.12) still doing a reversal and hit the Sell, it should be $100. 

That time all trade either need to be given up (CloseAll) or add big hedging as initially proposed by Icham.

This way, you can instruct your EA to do a calculation on how much pips you need based on latest data such as current spread by only referring to OrderProfit() solely.

I don't want to do the math here but I'm pretty sure, you are able to figure it out already. and for sure, the example above just a general sketch without considering other factors such as spread, commision, and swap.

*and if you are wondering; if 0.01 hit $1 after moving 100-pts, 0.12 need 833-pts to achieve $100.

Rafael Grecco
495
Rafael Grecco  
Ahmad Zuhairdi Noh:

Well, I know you don't literally mean it didn't you? As a matter of fact, it sure is possible and I've done it before.

Let create an example here for sake of other readers who still learning.

Lets use the following sequences: 0.01,0.02,0.03,0.05 and 0.08 with maximum 5 loops. The deposit is $1000 and 10% risk mean $100.

1st trade: Buy (0.01)

2nd trade: Sell (0.02)

3rd trade: Buy (0.01+0.03 = 0.04)

4th trade: Sell (0.02+0.05 = 0.07)

5th trade: Buy (0.01+0.03+0.08 = 0.12)

If the last trade (Buy with lots 0.12) still doing a reversal and hit the Sell, it should be $100. 

That time all trade either need to be given up (CloseAll) or add big hedging as initially proposed by Icham.

This way, you can instruct your EA to do a calculation on how much pips you need based on latest data such as current spread by only referring to OrderProfit() solely.

I don't want to do the math here but I'm pretty sure, you are able to figure it out already. and for sure, the example above just a general sketch without considering other factors such as spread, commision, and swap.

*and if you are wondering; if 0.01 hit $1 after moving 100-pts, 0.12 need 833-pts to achieve $100.

You are right, I was thinking of it another way. It is actually very simple.

EDIT:

By the way, this is my current iteration:

Graph

It is very stable, DD barely reach 10%. But there is a very specific condition that is killing my strategy... I think there is a hole in my programming. The MQL4 file already reached line 19000, it is getting very hard to find and fix things :P

Here are some things that I found work very well on a recovery strategy:

- Using Hedge and Averaging together helps recover from a losing position faster

- While I said that using Fibonacci progression for additional lots works good, it takes more time to recover. When time is essential, a multiplicative progression is better (I am using 1x 2x 4x 8x 16x)

- I always use breakeven when any trade reaches a certain profit. If breakeven is hit (trade is closed), the next trade should keep the same lot size.

- When a recover is succesfull, instead of closing all positions at breakeven or small profit, I only close the losing size (for example close all buys or all sells) and trail the profit of the remaining trades. These trades are highly leveraged and could give huge profits if it keeps momentum (I still have to make some adjustments on my EA to better use this).

I think that's it for now.

Icham Aidibe
11711
Icham Aidibe  

Yeah but yala ... we won't talk about ad vitam aeternam, here's a signal I run for one month to check the thing - same settings, same server etc ... ;)

edit : at first sight, after 1 day, in the actual state it's a piece of sh*t ; it could correct then, as there's days with and days without but i doubt - anyway it shows really interesting result only with metaquote server demo, with other brokers it's bad even during testing. 

By opening an account on metaquote, I saw that : 

I don't think it's a MTQ real account - maybe one day - it'll be interesting to spend time to correct it but for now, no, so let's say I let it get suicide & basta ! 

But for science with a quick look at the log, it opens all orders with a deviation : 10 - what I didn't see on testing log - it should be checked but I really feel lazy about. 

Rafael Grecco
495
Rafael Grecco  
Icham Aidibe:

Yeah but yala ... we won't talk about ad vitam aeternam, here's a signal I run for one month to check the thing - same settings, same server etc ... ;)

edit : at first sight, after 1 day, in the actual state it's a piece of sh*t ; it could correct then, as there's days with and days without but i doubt - anyway it shows really interesting result only with metaquote server demo, with other brokers it's bad even during testing. 

By opening an account on metaquote, I saw that : 

I don't think it's a MTQ real account - maybe one day - it'll be interesting to spend time to correct it but for now, no, so let's say I let it get suicide & basta ! 

But for science with a quick look at the log, it opens all orders with a deviation : 10 - what I didn't see on testing log - it should be checked but I really feel lazy about. 

Thanks for the update!

A soon as I have something ready I'll create a demo account to test it too.

Icham Aidibe
11711
Icham Aidibe  
Rafael Grecco:

Thanks for the update!

A soon as I have something ready I'll create a demo account to test it too.

Yes it's the metaquote server for MT5, it would be great if someone could check about these deviation points on the server & with the tester (it's displayed only on the server!)

I really got sick with that EA's code, so fallow land until further notice.


Icham Aidibe
11711
Icham Aidibe  

Update 23.04.2018 ---> where it doesn't forgive ... 

Before : 


After :


Icham Aidibe
11711
Icham Aidibe  

25/04 :  

2018.04.25 10:04:12.673 2018.01.02 11:58:37   *** Longs : 0.0603091 (0.05) [2] - Short : 0 (0) [0]
2018.04.25 10:04:12.673 2018.01.02 11:58:37   zero divide in 'YASS.mq5' (516,41)

No magic, nor even luck here around : it's absolutely abnormal for a hedging ea to have 2 long opened with no short. 

Ahmad Zuhairdi Noh
2298
Ahmad Zuhairdi Noh  
Rafael Grecco:

- When a recover is succesfull, instead of closing all positions at breakeven or small profit, I only close the losing size (for example close all buys or all sells) and trail the profit of the remaining trades. These trades are highly leveraged and could give huge profits if it keeps momentum (I still have to make some adjustments on my EA to better use this).

You said you will trail the winning position right? What if the reversal occurs before trailing even start? How do you overcome it? 

and

have you tried a spike guard? I mean when the drawdown drops more than 10% of current equity, you close all trade and execute ExpertRemove().

If you are lucky, losing 10% of equity still give you a net profit. I've done it before and still using it now.

Whenever the spike guard activates, that's a signal to stop trading for the following month. 

Ahmad Zuhairdi Noh
2298
Ahmad Zuhairdi Noh  
Icham Aidibe:

Yeah but yala ... we won't talk about ad vitam aeternam, here's a signal I run for one month to check the thing - same settings, same server etc ... ;)

edit : at first sight, after 1 day, in the actual state it's a piece of sh*t ; it could correct then, as there's days with and days without but i doubt - anyway it shows really interesting result only with metaquote server demo, with other brokers it's bad even during testing. 

By opening an account on metaquote, I saw that : 

I don't think it's a MTQ real account - maybe one day - it'll be interesting to spend time to correct it but for now, no, so let's say I let it get suicide & basta ! 

But for science with a quick look at the log, it opens all orders with a deviation : 10 - what I didn't see on testing log - it should be checked but I really feel lazy about. 

I've been watching its trade behavior through trade history but when you open the hedging, the ea seem to open extra 0.01 compare to its opposite trade. Why is that?

Is your strategy is like climbing a trend?

I mean if the trade going up, you will keep adding buy trade and at the same time, the EA is prepared to open SELL with the same lot plus extra 0.01 just in case the trend reverse?

The bold part is acting like a cushion just in case reversal occurs. Is it like that? or you may have other reason why you open the opposite trade with just extra 0.01?

Using lot value with extra 0.01 may take like, you know, well, maybe forever to break even the losing trade.