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

 
Ahmad Zuhairdi Noh:

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.

Hi Ahmad ! 

I'm actually looking how it performs and until today I found abnormal things so I'm correcting poquito a poquito, despacito ! 

It often closes that way :  

So it's a little deposit and because of the margin it stops adding hedge orders, it's still random signals and sometimes it losses. It's not a spike guard, I found it better to stop adding orders and accepting the loss rather than a spike guard as an equity stop.

So the way it closes is how I expect it does. 

I'm not adding extra lots. Are you sure it's not another one I opened after I closed the previous orders - if you could highlight it to me with a screenshot, because I can't explain it, it's not supposed to be !

I'm either not using the async mode, since it's used in HFT what has been pinned by Barack Obama, so to close the whole portfolio, I'm looping thru positions, each one is closed with its own execution delay and slippage (5*200ms=1s) - HFT is very controversial across people and brokers so I try to do without and be sure it's taking it far away from tester's ideal conditions and performances the test did let hear *even with the few bugs I highlighted*.


 
Ahmad Zuhairdi Noh:

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. 

Hi Ahmad,

I only trail the winning position when Profit is already positive.

If a reversal happens, the EA will open Hedge/Averaging positions. When all trades reach positive profit I close losing trades and trail winning trades.

About a spike guard, for example closing at 10% losing equipty. I have tried it, but I don't like it, it's too simple and loses too much balance. I'm working on something a little different...

For example, if we define that the maximum number of hedges is 5 (hedging infinitely will blow the account), than the last trade with the higher lot is what I call "last chance". This "last chance" must have a few rules, like a defined SL, or use a combination of trailing stop, pending orders, or whatever strategy we can think of. Something to avoid closing all positions at 10% loss. It should at least minimize loss.

I'm currently working on something that calculates the total size of the opposite trades and trying to apply that to a hedge or averaging as a last resort, but nothing final yet. See the image below. We can see this "last chance" at work, but I am not satisfied with it yet.


 
Rafael Grecco:

Hi Ahmad,

I only trail the winning position when Profit is already positive.

If a reversal happens, the EA will open Hedge/Averaging positions. When all trades reach positive profit I close losing trades and trail winning trades.

About a spike guard, for example closing at 10% losing equipty. I have tried it, but I don't like it, it's too simple and loses too much balance. I'm working on something a little different...

For example, if we define that the maximum number of hedges is 5 (hedging infinitely will blow the account), than the last trade with the higher lot is what I call "last chance". This "last chance" must have a few rules, like a defined SL, or use a combination of trailing stop, pending orders, or whatever strategy we can think of. Something to avoid closing all positions at 10% loss. It should at least minimize loss.

I'm currently working on something that calculates the total size of the opposite trades and trying to apply that to a hedge or averaging as a last resort, but nothing final yet. See the image below. We can see this "last chance" at work, but I am not satisfied with it yet.


Hi Rafael ! 

So you made it a game too !!! :-) I can see the profit has been improved since last graph !

I'm trying to introduce takeprofit & stoploss as you suggested in %balance rather than in points - that's what I'm actually working on !

 
Icham Aidibe:

Hi Rafael ! 

So you made it a game too !!! :-) I can see the profit has been improved since last graph !

I'm trying to introduce takeprofit & stoploss as you suggested in %balance rather than in points - that's what I'm actually working on !

Hi Icham!

Yes, this seems like a game :)

Instead of using TakeProfit I prefer to use money trailing, that is, my EA remembers the maximum profit achieved on a running trade (or group of trades) and trail it, when it falls 25% from maximum, it closes all trades.

Of course there are strategies that benefit from TP, but it is something you could also try to apply on your EA.


Talking about total profit, I don't think it is the most important thing. I have made some variations that makes profit for several years, like this:

I think this lasted for 3 or 4 years with low drawdown, then it died. As soon as I find a way to cut losses on a reasonable way, I'll put the EA to test on a real account.

PS- Important to remenber that tests are made using 99% quality data and trades usually takes from a few hours to a few days to close, so backtest results will probably be very close to real results. Real spreads will actually be smaller from what I am using on backtest and I believe slippage will be almost irrelevant.

 
Rafael Grecco:

Hi Icham!

Yes, this seems like a game :)

Instead of using TakeProfit I prefer to use money trailing, that is, my EA remembers the maximum profit achieved on a running trade (or group of trades) and trail it, when it falls 25% from maximum, it closes all trades.

Of course there are strategies that benefit from TP, but it is something you could also try to apply on your EA.


Talking about total profit, I don't think it is the most important thing. I have made some variations that makes profit for several years, like this:

I think this lasted for 3 or 4 years with low drawdown, then it died. As soon as I find a way to cut losses on a reasonable way, I'll put the EA to test on a real account.

PS- Important to remenber that tests are made using 99% quality data and trades usually takes from a few hours to a few days to close, so backtest results will probably be very close to real results. Real spreads will actually be smaller from what I am using on backtest and I believe slippage will be almost irrelevant.

Damn. Money trailing, that's a great idea you got there. Not easy to code, is it ?

 
Icham Aidibe:

Damn. Money trailing, that's a great idea you got there. Not easy to code, is it ?

Not very easy, but I use a software to help me with coding. The problem is that you have to learn how to use this tool.

I don't think I can post it's name here because it is a comercial software (not free).

If you are interested, send me a private message.

 
Rafael Grecco:

Not very easy, but I use a software to help me with coding. The problem is that you have to learn how to use this tool.

I don't think I can post it's name here because it is a comercial software (not free).

If you are interested, send me a private message.

Oh, that's ok : memorize profit each tick, trail few %cur away and cut if crossed : it would have been great to have it as a snippet or a lib 

it'll be alright, thank you anyway rafael.

 

Icham Aidibe:

I'm not adding extra lots. Are you sure it's not another one I opened after I closed the previous orders - if you could highlight it to me with a screenshot, because I can't explain it, it's not supposed to be !


Nah, my mistake. You are right, I'm confused between new open trade and previous trade. 

but still, 

when you open buy at 0.23,

then the price goes down 12-pts you open x2 of previous order but after that,

another reversal occurs; you quickly close both buy and sell results in negative profit.

Why is that? I thought you are looping the hedging for a few loops before actually give up the trade?

But on this scene, you already give up on the first loop.

 
Rafael Grecco:

I'm currently working on something that calculates the total size of the opposite trades and trying to apply that to a hedge or averaging as a last resort, but nothing final yet. See the image below. We can see this "last chance" at work, but I am not satisfied with it yet.

Ha., what happens if "last chance" is still trolling you? I know you want to avoid using an indicator by why don't you try Bollinger bands gradient? It works like charm for me at least for now. 

 
Ahmad Zuhairdi Noh:

Nah, my mistake. You are right, I'm confused between new open trade and previous trade. 

but still, 

when you open buy at 0.23,

then the price goes down 12-pts you open x2 of previous order but after that,

another reversal occurs; you quickly close both buy and sell results in negative profit.

Why is that? I thought you are looping the hedging for a few loops before actually give up the trade?

But on this scene, you already give up on the first loop.

Margin. It won't open a third one to preserve the margin. The new one is a random one.

Reason: