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.

Draw Chart Polyline - ConcurrentModificationException in JForex-SDK only
 Post subject: Draw Chart Polyline - ConcurrentModificationException in JForex-SDK only Post rating: 0   New post Posted: Tue 29 Jan, 2013, 14:13 

User rating: 2
Joined: Tue 25 Dec, 2012, 17:56
Posts: 15
Since chart polylines are limited to 150 points, I use a simple code with polyline.removePoint(0) that truncates the oldest point when reaching the IPolyLineChartObject.MAX_POINTS_COUNT limit. It works very well in JForex Client on live RT data and while using Historical Tester. The same code fails in JForex-SDK where it gives ConcurrentModificationException :?: . The attached Polyline_error.zip file contains polyline_error_info-and_console.txt that describes steps to repeat this error and the Console report. The complete JForexSDK project is in the same zip file.

The above described problem makes it impossible to develop and debug in Eclipse-JForex-SDK environment strategies that use those very useful self-truncating polylines.

Best regards,
leoterra


Attachments:
Polyline_error.zip [400.72 KiB]
Downloaded 559 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: Draw Chart Polyline - ConcurrentModificationException in JForex-SDK only Post rating: 0   New post Posted: Wed 30 Jan, 2013, 13:11 

User rating: 2
Joined: Tue 25 Dec, 2012, 17:56
Posts: 15
After investigating this problem somewhat closer, I found that it has nothing to do with polyline.removePoint(0). While working in SDK JForex API ver 2.7.8. it is impossible to add series of points using plain chart.add(polyLine); The problem is somewhat time-dependent, so sometimes it fails at the first point, sometimes it accepts a few.
After adding Thread.sleep(150) between adding points, it has accepted about a dozen calls but not every time. In Historical Tester it processes days of tick data at full speed without any problems. So, please compare relevant portions of the newest Client and SDK builds.

leoterra


 
 Post subject: Re: Draw Chart Polyline - ConcurrentModificationException in JForex-SDK only Post rating: 0   New post Posted: Mon 11 Feb, 2013, 13:34 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
could you please provide an example program and an example strategy which replicate the issue?


 
 Post subject: Re: Draw Chart Polyline - ConcurrentModificationException in JForex-SDK only Post rating: 0   New post Posted: Tue 12 Feb, 2013, 10:46 

User rating: 2
Joined: Tue 25 Dec, 2012, 17:56
Posts: 15
The attached Polyline_error_simple_test.zip contains an example program and strategy saved as a ready-to-use JForex-SDK poject. The same zip contains also step by step instruction and console printout in polyline_error_info-and_console.txt

Compared to the attachment in my first message, this one is simplified and draws just one polyline. It executes flawlessly in Client (both RT and Historical Tester) but fails immediately in SDK.


Attachments:
Polyline_error_simple_test.zip [25.81 KiB]
Downloaded 579 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.
 

Jump to:  

cron
  © 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