$ distance from a current trade?
6 replies
JS17
7 years ago #115686
How would I code a pending order that is set at a level which is a $ (money) amount from an exsiting position?
I basically am looking to place a hedge position at for example a £20 loss from the current trade
Thanks!
tomas262
7 years ago #139859
Yes, it can be done using Wizard. Why do you need such hedge? Do you plan to close the hedge when a position gets back into profit? I will make an example for this and upload here
JS17
7 years ago #139867
Tomas, Yes exactly what you say. I use a hedge instead of a stoploss.
I currently let the EA monitor open PL and then place the hedge when a target loss is hit.
The only problem with this method is that my broker cannot see this position and therefore I have no case if the slippage is too big.
I just don’t know how to code the pending order position
Many thanks again
tomas262
7 years ago #139938
Hello,
this is a simple example how you can do a simple hedge for a long position when open PL gets below 20 dollars. The EA expects the original long order to be opened with magic number = 1000. Let me know if any questions
JS17
7 years ago #140078
Thankyou Tomas 🙂
yujhnlov
7 years ago #140691
this is a simple example how you can do a simple hedge for a long position when open PL gets below 20 dollars. The EA expects the original long order to be opened with magic number = 1000. Let me know if any questions
tomas262
7 years ago #140720
this is a simple example how you can do a simple hedge for a long position when open PL gets below 20 dollars. The EA expects the original long order to be opened with magic number = 1000. Let me know if any questions
Hello,
do you have any issues attaching your file?
Viewing 6 replies - 1 through 6 (of 6 total)