Hello Pedro do you find any break through in hedging
I hedge on manually trading. I have many different techniques. There are several ways of hedging, so I don't know which is the right way you mean.
!["Hedging" in Forex trading -Why do it? - Hedge is a method to limit risk "Hedging" in Forex trading -Why do it? - Hedge is a method to limit risk](https://c.mql5.com/36/62/hedging-in-forex-trading-why-do.jpg)
"Hedging" in Forex trading -Why do it? - Hedge is a method to limit risk
- 2017.01.19
- www.mql5.com
Hedging is a method to limit risk. Of course you could achieve it without hedging but it will be much more complicate to manage. It is hedging in the meaning of openning orders in differnet directions. It is not hedging as interpreted in your post to limit your risk by openning the same order on other direction, this we all agree is useless
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello everyone!
I'm trying to code a hedge position when the price goes against me certain amount of pips.
I've tried two different ways, but I'm not achieving it in a right way.
The first of them is opening a pending order when a position is open:
So, the idea is that the open price of the pending order is the "stoploss" of the first order. The stoploss of the pending order is the open price of the first order and I wanted to calculate the take profit using:
The idea behind that is this:
lotValue and lotValueHedge can be seen as "how many USD I win/lose with each pip". So, I thought that if I calculate lotValueHedge*X-lotValue*X-lotValue*stopLossPips = 0, then X would be the amount of pips that the price needs to move in the direction of the hedge position in order to both of them have the same USD value, right?. Welp, it does not happens that way. The first order is slightly more negative than the second one. Also, using this I get frequently "invalid stops" because of the take profit level and I don't know why its bigger than the open price of the second order.
Any thoughts?
The second of them is the same idea, but instead of opening a pending order, it just opens a second order when the price moves against the initial position X amounts of pips. The code is mostly the same, the only difference is that there is no pending order part.
How can I achieve this in a better way? How its correctly done? Is my approach good?
Thank you in advance!
PS