Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

Stop loss is not taken! Heavy bug!
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=85&t=50329
Page 1 of 1

Author:  SFXbernhard [ Tue 05 Nov, 2013, 21:36 ]
Post subject:  Stop loss is not taken! Heavy bug!

So after the offer order was filled, the stop loss (SL) was moved closer to the price. But then this SL was totally ignored!
This is a heavy bug and can cost lots of money!

Please take a look on the following two screenshots I took a few minutes ago:

Image
Image


Please fix it asap!

Attachments:
File comment: Shot entry was a place offer order
131105SL_ignored2.png [39.48 KiB]
Downloaded 993 times
File comment: Short entry ignores SL
131105SL_ignored.png [88.46 KiB]
Downloaded 1036 times

Author:  Platform Support [ Mon 11 Nov, 2013, 12:26 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

We are looking into it. This seems to be some random bug as we could not repeat it so far. Do you know the exact steps to repeat it? Every time?

Author:  SFXbernhard [ Mon 11 Nov, 2013, 18:17 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

It is not every time.
But as you can see the strategy changed the SL price very often. Maybe this is the reason?
I will observe this and write you if it happens again.

But this issue should not be possible under any circumstances!
Maybe you could implement a security watchdog to avoid this situation.

Author:  Platform Support [ Thu 14 Nov, 2013, 17:26 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

We believe that we have found the bug on the server side and have rectified it. The deployment is planned on DEMO this w/e.

Thank you for your feedback.

Author:  SFXbernhard [ Mon 18 Nov, 2013, 02:01 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

Just to inform you: The problem still appears on DEMO 2.29.1!

Image

Attachments:
bug2.29.1.png [39.6 KiB]
Downloaded 938 times
bug2.29.1.png [88 KiB]
Downloaded 504 times

Author:  SFXbernhard [ Mon 18 Nov, 2013, 10:26 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

Look what happens here on 2.29.1
If this was live, it would have been a disaster!

Image

Attachments:
furtherbug2.29.1.png [60.86 KiB]
Downloaded 970 times

Author:  Platform Support [ Fri 22 Nov, 2013, 15:56 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

We are looking into this.

Author:  fxbird [ Wed 04 Dec, 2013, 19:02 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

I had the same bug (Stop loss not executed) a few times recently. It happened today again on my demo account. I am running version 2.29.5 with JForex API v2.9.4.3.
This is indeed a big issue :o

Author:  StephanePaulus [ Mon 09 Dec, 2013, 11:27 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

fxbird wrote:
I had the same bug (Stop loss not executed) a few times recently. It happened today again on my demo account. I am running version 2.29.5 with JForex API v2.9.4.3.
This is indeed a big issue :o


I also have this problem. It occurred multiple times last week.

Author:  wolfram [ Wed 11 Dec, 2013, 08:42 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

Same bug here , stop loss is ignored. Platform version 2.3 , jforex version 2.9.5.1

Author:  Platform Support [ Thu 12 Dec, 2013, 19:24 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

We are looking into this.

Author:  SFXbernhard [ Thu 02 Jan, 2014, 15:36 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

This bug still appears in my DEMO 2.30.1
Maybe it is because the position was hold over New Year?

Please fix this ASAP, Prio ONE!!!!

Image

Attachments:
140102notTakenSL_detail.png [35.29 KiB]
Downloaded 828 times

Author:  c112 [ Thu 02 Jan, 2014, 19:15 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

Did you set SL after the current price crossed the SL price? maybe their engine just track crossing event and don't close afterwards
so you could use this:
function safeStopLoss(order, sl){
    if ( order.isLong()){
        if (history.getLastTick(instrument).getBid() < sl)
            order.close();
        else
            order.setStopLossPrice(sl);       
    }else{
        if (history.getLastTick(instrument).getAsk() > sl)
            order.close();
        else
            order.setStopLossPrice(sl);
    }
}

Author:  Jiri [ Fri 03 Jan, 2014, 11:38 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

Absolutely critical bug, stop loss and stop limit are ignored. Platform version 2.30.1 , jforex version 2.9.5.1

you should fix it ASAP

Author:  SFXbernhard [ Fri 03 Jan, 2014, 13:02 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

Here is another example
Image

The closes you can see are partial closes only. The full amount was not closed, although a stop loss was set.
This bug makes all our tests absurd.

Dukascopy is not able to change this bug at the moment.

The only way I see at the moment is to implement a manual SL watchdog in the onTick(Instrument instrument, ITick tick) function.
If you have saved your order in a IOrder order object then check:
        if (order != null && order.getState() == State.FILLED){
            if (order.isLong() && tick.getBid() <= order.getStopLossPrice()){
                order.close();
            }
            if (!order.isLong() && tick.getAsk() >= order.getStopLossPrice()){
                order.close();
            }
        }


Attachments:
140103notTakenSL_again_just_today.png [44.32 KiB]
Downloaded 802 times

Author:  Platform Support [ Mon 06 Jan, 2014, 12:02 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

New version of the server has been deployed on Saturday with the changes which would hopefully solve the problem. Please inform if you still face these issues.

Author:  SFXbernhard [ Mon 06 Jan, 2014, 12:39 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

Dukascopy!

Thanks, hope this helps.
It seems like working because on one account a trade was immediately closed on Sunday 22h00 GMT. It was one of the trades, which were far in SL for a long time already.
I have to restart several trading systems now, because the history became useless by this bug.
This bug cost us more than 20 hours of work, some $ lost of synchronized live accounts and some useless histories of our trading systems.

Please try to handle this kind of bugs with more accuracy in the future.
If you want more customers, keep DEMO and LIVE versions as close as possible, also for the working conditions.
Deploy an extra BETA for any testing purposes. Don't use the DEMO!

Thank you

SFXBernhard
Stash GmbH
Munich

Author:  Platform Support [ Mon 13 Jan, 2014, 17:12 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

New server version has been deployed on the w/e. Please inform if the problem persists.

Author:  SFXbernhard [ Mon 11 Apr, 2016, 10:40 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

Oh dear!
The problem appeared again in JForex Demo 2.45.40
Please fix, before you take this version for live! This bug is very dangerous!!
Image
Image

The price touched SL several times before!


It seems your trailing SL does not work properly, here is the message log (shortened)
2016-04-11 06:30:01 Position 105128300 TAKE PROFIT #400420651 price changed from 1.14351 to 1.1441
2016-04-08 15:25:47 Position 105128300 STOP LOSS #400155908 price stop changed by Traling Stop from 1.1357 to 1.13802 MKT 1.14192
2016-04-08 15:20:00 Position 105128300 TAKE PROFIT #400420651 price changed from 1.14209 to 1.14351
2016-04-08 14:30:00 Position 105128300 TAKE PROFIT #400420651 price changed from 1.14076 to 1.14209
2016-04-08 13:25:46 Position 105128300 STOP LOSS #400155908 price stop changed by Traling Stop from 1.1334 to 1.1357 MKT 1.1396
2016-04-08 08:30:01 Order CANCELLED: #400155907 TAKE PROFIT SELL 2.05 mil. EUR/USD @ LIMIT 1.1396 IF BID => 1.1396 - Position #105128300
2016-04-08 08:30:01 Order ACCEPTED: #400420651 Parent Order #400155907 TAKE PROFIT SELL 2.05 mil. EUR/USD @ MKT IF BID => 1.14076 - Position #105128300
2016-04-07 17:24:03 Order FILLED at 1.1373 (#400178850 Parent Order #400155905 PLACE BID 2.05 mil. EUR/USD @ 1.1373 EXPIRES: GTC) - Position #105128300
2016-04-07 15:00:04 Position 105128300 STOP LOSS #400155908 Base Price 1.13795
2016-04-07 15:00:04 Order CANCELLED: #400155906 STOP LOSS SELL 2.05 mil. EUR/USD @ MKT IF BID <= 1.1335 - Position #105128300
2016-04-07 15:00:04 Order ACCEPTED: #400155908 Parent Order #400155906 STOP LOSS SELL 2.05 mil. EUR/USD @ MKT IF BID <= 1.1334 - Position #105128300 trailing stop Step 0.0023
2016-04-07 15:00:04 BID ACCEPTED: #400155905 PLACE BID 2.05 mil. EUR/USD @ 1.1373 EXPIRES: GTC - Position #105128300
2016-04-07 15:00:04 Order ACCEPTED: #400155907 TAKE PROFIT SELL 2.05 mil. EUR/USD @ LIMIT 1.1396 IF BID => 1.1396 - Position #105128300
2016-04-07 15:00:04 Order ACCEPTED: #400155906 STOP LOSS SELL 2.05 mil. EUR/USD @ MKT IF BID <= 1.1335 - Position #105128300

Attachments:
SLignoredagain.png [39.67 KiB]
Downloaded 334 times
SLignoredagain_mini.png [18.56 KiB]
Downloaded 539 times
SLignoredagain2mini.png [7.66 KiB]
Downloaded 549 times

Author:  Platform Support [ Mon 18 Apr, 2016, 11:03 ]
Post subject:  Re: Stop loss is not taken! Heavy bug!

This problem was solved on the server side the same day.

  Page 1 of 1