Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

JForex - NullPointerException and wrong order details
 Post subject: JForex - NullPointerException and wrong order details Post rating: 0   New post Posted: Wed 04 Dec, 2013, 20:54 
User avatar

User rating: 7
Joined: Fri 13 Jan, 2012, 20:49
Posts: 94
Location: Poland, Warsaw
Hello Support,

I would like to register a bug on JForex Desktop platform. The bug reveals when orders are being partially closed and starting and stopping a strategy.

The bug reveals at many different scenarios however following is the most certain:
1. Trade at market EURUSD at least 10.000 units.
2. Run attached strategy.
3. Stop the strategy.

Repeat above steps until NullPointerException is thrown at Messages Tab (usually the bug reveals between 3rd to 10th repetitions).

The result of the bug is not only the Exception. When you look at top line message of Strategy message tab you will see that order details are wrong (profit in currency is 0, amount of the order is 0). Every new run of any strategy will return the same wrong details for the order and it is not possible to close such order from any strategy. In order to have correct results again one need to close JForex Desktop and start it again.

I am attaching:
1. Java traces
2. Strategy code
3. Strategy message tab
4. JForex message tab.
5. Screenshot of the platform after bug occurrence.

Could you please investigate?

Best regards,
Kurak

Image


Attachments:
BugTest.java [1.71 KiB]
Downloaded 123 times
java_traces.txt [1.93 KiB]
Downloaded 111 times
jforex_messages_tab.txt [12.13 KiB]
Downloaded 131 times
Strategy_message_tab.txt [2.54 KiB]
Downloaded 143 times
jforex_screenshot.png [199.25 KiB]
Downloaded 329 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: JForex - NullPointerException and wrong order details Post rating: 0   New post Posted: Fri 06 Dec, 2013, 10:28 
User avatar

User rating: 7
Joined: Fri 13 Jan, 2012, 20:49
Posts: 94
Location: Poland, Warsaw
Hello Support,

Did you manage to reproduce above bug?

It is very serious issue making it unable to perform reliable trade management. The best example would be following screenshot of JForex with the custom developed tab which presents currently FILLED orders. Please compare it to original tab. The amount column is totally wrong. There are negative amount values! What’s more there is no possibility to perform any operation on such order from strategy code (it is not possible to modify SL, TP nor close the trade).

At the beginning I though there is something wrong with my app. But then I run the simplest possible strategy with following code in onStart method which showed exactly the same wrong values.
        for (IOrder o : engine.getOrders()){
            if (o.getState() == State.FILLED){
                console.getOut().println(o.getId() + " amount: " + o.getAmount());
            }
        }       

Could you please confirm you can reproduce scenario from first post and registered the issue as a bug?

Best regards,
Kurak

Image


Attachments:
jforex_bug.png [161.23 KiB]
Downloaded 348 times
SimpleStrategy_output.txt [391 Bytes]
Downloaded 129 times
SimpleStrategy.txt [1.75 KiB]
Downloaded 161 times
jforex_bug.png [158.95 KiB]
Downloaded 226 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: JForex - NullPointerException and wrong order details Post rating: 0   New post Posted: Fri 06 Dec, 2013, 17:42 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
kurak777 wrote:
Did you manage to reproduce above bug?
Yes we did, it will be fixed as soon as possible.


 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com