PDA

View Full Version : Stop-loss in BUY-STOP and SELL-STOP orders not working correctly



adheer
12-15-2015, 07:28 AM
It seems that the stop-loss is not working for BUY-STOP and SELL-STOP orders correctly if the stop-loss value is below the current price for SELL-STOP orders, and above the current price for BUY-STOP orders.

Assume we are trading EUR/USD and the current price is 1.10000. I want to place a SELL-STOP order at 1.09500 (50 pips below current price). My stop-loss is 25 pips - which is 1.09750. My take-profit is 25 pips - which is 1.09250.

When I use the NewLimitOrder() as below, it fails and does not place a SELL-STOP order.


Dim result
result = NewLimitOrder TRADE_ACTION_SELL_STOP, "EUR/USD", 0.1, 1.09500, 1.09750, 1.09250

It fails because the stop-loss is below current price even though it is a pending sell-stop order and will not be executed until price falls to 1.09500.

But - if I set the stop-loss above the current price, e.g. 1.10150 (15 pips above current price), it works correctly and opens a SELL-STOP order.


Dim result
result = NewLimitOrder TRADE_ACTION_SELL_STOP, "EUR/USD", 0.1, 1.09500, 1.10150, 1.09250

So, if want to place my stop-loss below the current price, how should I do it ?

Rawan-HS
12-15-2015, 01:59 PM
Dear :)

We have found the issue and we have solved in the next Patch

adheer
12-15-2015, 06:05 PM
Dear :)

We have found the issue and we have solved in the next Patch

Thank you, Sir.