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

Severe bug in equity calculation of JForexClient
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=85&t=54434
Page 1 of 1

Author:  FXjuxe [ Thu 20 Oct, 2016, 20:15 ]
Post subject:  Severe bug in equity calculation of JForexClient

Hello Support,

I'm running the current JForexClient in version 2.45.60 with API 2.12.45.
The client shows the equity field in the left lower corner and the equity calculation in this version is not working correctly.
In the attachment you can find three screenshots in chronological order(one, two three).
Here are the data for equity and P/L:

one.png: Equity 855,186.16 / PL 18.01
two.png: Equity 855,171.90 / PL 17.83
three.png: Equity 855,174.54 / PL 17.78

You can clearly see that the equity has dropped by 11.62EUR while the PL has only dropped by 0.23EUR.
I can assure you that within these screenshots no other order submission have happened(as you should see on your server logs for this DEMO account).
Please fix this ASAP as my strategies rely on a correct calculated equity!

Regards,
Juergen

Image
Image
Image

Attachments:
one.png [257.2 KiB]
Downloaded 619 times
two.png [259.03 KiB]
Downloaded 635 times
three.png [259.38 KiB]
Downloaded 633 times

Author:  Platform Support [ Fri 21 Oct, 2016, 09:45 ]
Post subject:  Re: Severe bug in equity calculation of JForexClient

This is not a bug.
Equity is coming from our server once every 10 seconds or after some changes in positions or orders.
Profit/loss is being calculated in platform on every price change.
As a result, P/L is changing much often than the Equity.

This has been solved in JForex 3, which is available on DEMO. We receive so called "base equity" from the server there, which does not include unrealized P/L and we add the unrelized P/L calculated in the platform to base equity to get the Equity.

Author:  FXjuxe [ Fri 21 Oct, 2016, 10:24 ]
Post subject:  Re: Severe bug in equity calculation of JForexClient

That is really strange.
I've not seen such fluctuations in former versions of the JForexClient.
When you look at the amount of the orders and you see how much the equity is wrong, then I must insist this is a bug.
Even if the server update every 10secs or so, the actual PL has changed by a few cents but the equity has changed over 10EUR!

Please check the logs on your side again, because this makes no sense at all.
Regards,
Juergen

  Page 1 of 1