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 2.45.33 has Instrument subscription bug
 Post subject: JForex 2.45.33 has Instrument subscription bug Post rating: 0   New post Posted: Thu 07 Jan, 2016, 17:21 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
Dear Support,

strategies, which subscribe to Instruments by the setSubscribedInstruments(Set<Instrument>, boolean) https://www.dukascopy.com/client/javadoc/com/dukascopy/api/IContext.html#setSubscribedInstruments(java.util.Set,%20boolean)
get a Java Console error as follows
2016-01-07 17:15:01.100 ERROR c - Event execution error: com.dukascopy.dds2.greed.actions.subscribe.FullDepthInstrumentSubscribeAction, message: null
java.lang.NullPointerException
   at com.dukascopy.dds2.greed.actions.subscribe.FullDepthInstrumentSubscribeAction.GA(L:53)
   at com.dukascopy.dds2.greed.actions.c.run(L:48)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)

Code Sniplet in "onStart(IContext context)" function:
        
Set<Instrument> instrumentsContext =  new HashSet();
instrumentsContext.add(Instrument.EURUSD);
instrumentsContext.add(Instrument.USDCAD);
context.setSubscribedInstruments(instrumentsContext, true);

It does not happen in live at the moment as the version is still 2.45.28
Please don't roll this version out into live, this bug could terminate a lot of working strategies!


Attachments:
File comment: full strategy in source code
SubscriptionTest.java [1.27 KiB]
Downloaded 140 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 2.45.33 has Instrument subscription bug Post rating: 0   New post Posted: Tue 12 Jan, 2016, 17:12 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We were unable to reproduce this. Could you check that correct maven artefacts are used.


 
 Post subject: Re: JForex 2.45.33 has Instrument subscription bug Post rating: 0   New post Posted: Wed 13 Jan, 2016, 14:06 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
It seems like working now. Maybe it was an instrument feed problem. I will let you know if this happens again.


 

Jump to:  

  © 1998-2025 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