Hi! I’m developing a EA that is trend following system. Now I’m in the part of implementing a good auto-hedge strategy.
At this point I enter a trade in daily view when some conditions are met, like trend, standard deviation channels and moving averages.
But when the trade does not work at the beginning on the good direction, I let the exit function to close the position, but while this exit condition is met I want to place a hedge position.
I place the hedge position when the normal position has 60 pips loss, and trail the hedge 60 pips.
The question here is if this is a good “distance” for both the start of the hedge and the trail of the hedge.
I also was thinking about using ATR for the trailing, start at -60 pips and do a trail stop, with starting stop just at the open price of the normal position.
Because the trend following nature of my system, and the long term view (daily view) the profit of the trades is more than 500 pips per trade, so losing 60 pips in a hedge is not big deal.
The exit strategy will stop the normal position when the condition is met, basically is when the momentum of the pair is getting slow (two averages cross).
I read someplace that the hedge should start at maybe 50 pips and place a stop only 10 pips below the open price of the hedge, don’t know if this is good strategy or mine is better or if there is a better one in your mind.
“Hedging” will have ZERO impact on your profitability. Actually, it might even cost you money. It cannot improve your performance. It’s only an accounting variation.
I know that. My system will use hedging in this way:
Place normal position with the signals. If the position was placed with wrong timing it will go contrary to the expected direction. Once it reaches position N the auto hedge function will launch a contrary position of the same size. The objective of this hedge is, if the original position is right, the hedge will only maintain or freeze the account equity while the original trade returns to the right place, in this situation the hedge is not useful, and will be better to wait for the trade to retake the right direction.
But if the trade is placed and for some reason the direction of the trade is wrong, then the hedge will start working and the original trade eventually will be out by the exit system (not stop loss, but an exit conditions). If this happens, the hedge will be with profit offsetting partially the loss of the trade, limiting the net loss to about “N” pips, after the original position be closed the hedge will also be closed.
In the first situation you are right and hedging will have zero impact, and maybe (surely) will have a fraction of loss. But on the second situation hedging will have a positive impact reducing net loss.
Lets say, in my demo account yesterday a trade was placed in wrong time, and after 60 pips (that’s the number N I defined in yesterday test) the hedge was launched. After a while (about 100 pips) the original trade was closed at a loss, but the hedge was 40 pips in profit. Because it has a trailing stop it now has 120 pips in profit, offsetting fully the loss of the original trade, and if the pair continues the route the hedge will in effect increase the profitability.
By “hedging” you’re muddying the waters. Putting the contrary position on is the same as closing your initial position at the second’s entry point - except that you’ll have a second spread cost and might be subject to negative carry. Having the initial position closed at a point further out of the money (for that trade) is the same as opening a new trade in that direction at that point. But is your system giving you a signal to enter that new trade?
Furthermore, by effectively closing the initial trade prior to your pre-determined exit point by doing that “hedge” you remove any chance of seeing your loss reversed if the market turns back in your direction. The second position locks the loss in.
So what you’re talking about here is cutting a position before your system tells you to and then entering a new trade in the other direction that might not have ever been signaled. You’re turning one system into something completely different. If you’re trying to trend trade you have to realize that drawdowns are a feature and that stops (which is basically what your “hedge” is) most often don’t benefit performance. I say this from lots of testing experience.
Yes, my system gives a entry signal, but it has a “delay” of 5 periods (5 days) before placing a new trade, to avoid whipsaw. And if in that period the stock gives entry signal, it is ignored. And also there is the exit or stop strategy on my system. That stop strategy will exit the position when it “thinks” that the initial decision was wrong, and is not based on the amount of pips in loss.
Ok, thanks for your comments. In my real accounts I don’t use hedge in this moment, I’m testing only in demo accounts the hedge feature of my EA, comparing two accounts at the same time to see which one has better performance.
The latest code for hedge I programmed places a hedge position when the original trade has 75 pips loss, with a fixed stop at -25 pips and fixed take profit at +25 pips, the system place one hedge position again, if the original one is closed, so if the move in opposite direction of the original trade grows, various hedge positions are placed and closed taking “profits”.
If the original trade is closed by the exit strategy (that is not predefined point, but a predefined set of conditions. Note that I also have a predefined stop loss, and my lot size is calculated with this stop loss in mind to be less than 1% of account), then the hedge position changes it’s behavior, and instead of having fixed stop loss/take profit, it starts trailing stop loss and removes take profit, so if the opposite direction continues longer, the hedge could recoup all the original trade loss and maybe generate some profit before it is closed by the trailing stop loss.
Let’s see what happens in the demo accounts. By the way, I was unable to backtest this strategy on MT4, something is missing in my code, and it always return 0 trades done.
Ok, they are ready and setup. The both demo accounts are running with same parameters, same pairs, same all with the exception of the hedge enabled in one of them and disabled on the other.
I’m tuning the hedge algorithm, it has bugs so the results with hedge are wrong. It placed hedges when it should not place hedges, so some of the hedges were losers and repeated losers because of this bug.
Dar cobertura cuando tengo un tipo de posición el comercio. Sé estará a cargo en mi dirección. Corto plazo, veo una corrección que se va a desplegar, por lo que aprovecho una posición basada en que.
When I asked whether the system was giving a new entry signal I meant in the direction of the “hedge” at the time the original trade is closed based on its rules for being closed.
For example, you go long at 100. The market goes to 95 and the “hedge” is put on. The market then goes to 90 and the original trade is closed based on its closure rules, leaving you still with the “hedge” open. It’s like having gone short at 90 (having taken a 5 point loss on the first trade), but would the system have given you a short signal at 90? It sounds like no based on the wait rule, so the “hedge” is altering the base system - unless you also close it at the same time as the original trade at 90, in which case all you’ve done is create a stop at 95 and needlessly cost yourself the spread by doing the “hedge”.
The latest code for hedge I programmed places a hedge position when the original trade has 75 pips loss, with a fixed stop at -25 pips and fixed take profit at +25 pips, the system place one hedge position again, if the original one is closed, so if the move in opposite direction of the original trade grows, various hedge positions are placed and closed taking “profits”.
Have you actually run the math on this? As I noted before, there is ZERO benefit to be had. So long as you have the “hedge” position on you are in a complete offset state. What you make on the “hedge” you lose on the original trade and vice versa. You can put on and take off as many as you want. Their “profits” will always be offset by losses in the base position. You will have effectively closed your first trade at your “hedge” entry point and will just be burning your account capital each time you put on and take off the secondary positions.
Let’s walk through an example using your 25 pip TP/SL for the hedges. We’ll open an EUR/USD long position at 1.4000 and put the first “hedge” entry at 1.3950.
Market moves to 1.3950. Hedge entered short. Original Trade P/L: -50, Net P/L -50
Market moves to 1.3925. Hedge exited for profit, New hedge entered. Original Trade P/L: -75, Hedge P/L: +25, Net P/L -50
Market moves to 1.3900. Hedge exited for profit, New hedge entered. Original Trade P/L: -100, Hedge P/L: +50, Net P/L -50
Market moves to 1.3925. Hedge stopped for loss, New hedge entered. Original Trade P/L: -75, Hedge P/L: +25, Net P/L -50
Market moves to 1.3950. Hedge stopped for loss, New hedge entered. Original Trade P/L: -50, Hedge P/L: 0, Net P/L -50
Market moves to 1.3925. Hedge exited for profit, New hedge entered. Original Trade P/L: -75, Hedge P/L: +25, Net P/L -50
And so on. It won’t matter where you put your “hedge” SL and/or TP. The math aways works out the same (except I didn’t account for losing the spread each time you do a new “hedge”). Once you put the hedge on you lock in the loss to that point and nothing can change where your account P/L is concerned, until you’re back to a unidirectional exposure.
If the original trade is closed by the exit strategy (that is not predefined point, but a predefined set of conditions. Note that I also have a predefined stop loss, and my lot size is calculated with this stop loss in mind to be less than 1% of account), then the hedge position changes it’s behavior, and instead of having fixed stop loss/take profit, it starts trailing stop loss and removes take profit, so if the opposite direction continues longer, the hedge could recoup all the original trade loss and maybe generate some profit before it is closed by the trailing stop loss.
And this goes to my earlier point. By leaving the “hedge” open you are doing a trade not signaled by your system. You are, in fact, trading another system all together, muddying the ability to guage the success or failure of the first.