Hi jcl,

I have found that the problem is related to virtual hedging, I use Hedge=5 in my script.

If Hedging is not set then the stops are set close to what I expect, although if I leave it default or set it to 1.0, it works like with 2.0. If I set it to 3.0 then it works correctly.

CFD prices are not available on demo accounts at fxcm so I did my testing on a real account - thats why I have not very much test cases:

Hedging not set, StopFactor not set, Stop = 10:
9344/9365 (open/stop at fxcm)
9345/9366

StopFactor=3 Stop=10
9348/9379

StopFactor=1 Stop = 15
9349/9370

--
When Hedging=5 and StopFactor not set then the fxcm stops are way further like in my first post.

It is not clear to me what is the best method to handle the broker stops in virtual hedging. For me setting the broker stops of pool trades to the furthest of the stops (corrected with StopFactor) would be enough.