Dukascopy
 
 
Wiki JStore Search Login

JFOREX-3168 How to create IPolyLineChartObject??
 Post subject: JFOREX-3168 How to create IPolyLineChartObject?? Post rating: 0   New post Posted: Thu 25 Aug, 2011, 07:45 

User rating: 0
Joined: Thu 25 Aug, 2011, 07:19
Posts: 8
Location: Russian Federation,
Hello, I create this code, in first add file.
But, when I try create IPolyLineChartObject, I am get error.
2011-08-25 06:44:59 java.lang.NoSuchMethodException: com.dukascopy.charts.drawings.PolyLineChartObject.<init>(java.lang.String) @ jforex.charts.drawTicks1(charts.java:153)


Attachments:
File comment: This file work
charts.java [7.78 KiB]
Downloaded 531 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: How to create IPolyLineChartObject?? Post rating: 0   New post Posted: Thu 25 Aug, 2011, 08:41 

User rating: 0
Joined: Thu 25 Aug, 2011, 07:19
Posts: 8
Location: Russian Federation,
But this file don't work!
Tell me pease in exemple how to create IPolyLineChartObject??
Why I get error?


Attachments:
File comment: But this file don't work
ChartsNotWork.java [7.79 KiB]
Downloaded 544 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: How to create IPolyLineChartObject?? Post rating: 0   New post Posted: Thu 25 Aug, 2011, 11:59 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
See the following example:
https://www.dukascopy.com/wiki/index.php ... een_prices


 
 Post subject: Re: How to create IPolyLineChartObject?? Post rating: 0   New post Posted: Mon 29 Aug, 2011, 07:22 

User rating: 0
Joined: Thu 25 Aug, 2011, 07:19
Posts: 8
Location: Russian Federation,
API Support wrote:

Hello, I see example and create new Strategy, but I'm have strange line..
I attached screenshot, Strategy and result.
Tell me please, I'm doing wrong?
I'm in a deadlock.


Attachments:
try_polyline_result.txt [73.6 KiB]
Downloaded 537 times
Chart1.java [3.82 KiB]
Downloaded 507 times
try_polyline1.png [103.22 KiB]
Downloaded 561 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: How to create IPolyLineChartObject?? Post rating: 0   New post Posted: Mon 29 Aug, 2011, 08:23 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
romanvip wrote:
Tell me please, I'm doing wrong?
You are accessing overlapping history ranges on every tick, as well you are redrawing almost the same line on every tick. Consider creating the line in onStart method and on every tick in onTick adding just a couple of points OR alternatively move all the current logic to the onStart method and then optionally in onTick method add new points to your line.
Consider using SimpleDateFormat when printing dates.


 
 Post subject: Re: How to create IPolyLineChartObject?? Post rating: 0   New post Posted: Mon 29 Aug, 2011, 09:46 

User rating: 0
Joined: Thu 25 Aug, 2011, 07:19
Posts: 8
Location: Russian Federation,
API Support wrote:
romanvip wrote:
Tell me please, I'm doing wrong?
You are accessing overlapping history ranges on every tick, as well you are redrawing almost the same line on every tick. Consider creating the line in onStart method and on every tick in onTick adding just a couple of points OR alternatively move all the current logic to the onStart method and then optionally in onTick method add new points to your line.
Consider using SimpleDateFormat when printing dates.

Yes, thank you, I know it.
I Create the Strategy, moved logic to the onStart method. But strange line remained.
I think the problem is in API.
In this Strategy i use SimpleDateFormat when printing dates.


Attachments:
Chart1.java [3.76 KiB]
Downloaded 537 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: How to create IPolyLineChartObject?? Post rating: 0   New post Posted: Mon 29 Aug, 2011, 12:41 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
romanvip wrote:
But strange line remained
Please elaborate - what do you mean by the "strange line"?


 
 Post subject: Re: How to create IPolyLineChartObject?? Post rating: 0   New post Posted: Tue 30 Aug, 2011, 07:58 

User rating: 0
Joined: Thu 25 Aug, 2011, 07:19
Posts: 8
Location: Russian Federation,
API Support wrote:
romanvip wrote:
But strange line remained
Please elaborate - what do you mean by the "strange line"?

I attached screenshot, where pointed "strange line".
Where you start strategy, you do not have this line?


Attachments:
strange_line1.png [111.26 KiB]
Downloaded 645 times
strange_line.png [139.28 KiB]
Downloaded 646 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-3168 How to create IPolyLineChartObject?? Post rating: 0   New post Posted: Tue 30 Aug, 2011, 08:32 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
romanvip wrote:
Where you start strategy, you do not have this line?
We did reproduce the behavior. The issue is under investigation.


 

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