Dukascopy
 
 
Wiki JStore Search Login

JFOREX-3596 createPolyLine on IChartObjectFactory not working
 Post subject: JFOREX-3596 createPolyLine on IChartObjectFactory not working Post rating: 0   New post Posted: Thu 31 May, 2012, 07:54 

User rating: 0
Joined: Thu 31 May, 2012, 07:47
Posts: 1
Hi,

Did a quick search on the forum for a sollution to my problem, but only got this topic which didn't much help.

https://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=65&t=38943&p=49971&hilit=createPolyLine#p49971

My problem is as follows (The API version I use is version 2.6.70)

A simplified version of my code looks like this (with line numbers). "chart" is an object of type IChart.

private void drawPoly() {
   IPolyLineChartObject line = chart.getChartObjectFactory().createPolyLine("cp_");
   chart.addToMainChartUnlocked(line);
   return;
}



The problem I have is when I run my strategy, I get this error:

java.lang.NoSuchMethodException: com.dukascopy.charts.drawings.PolyLineChartObject.<init>(java.lang.String) @ Autochartist.Autochartist_ChartPatterns.drawPoly(Autochartist_ChartPatterns.java:2)

The API documentation on the dukascopy site says this about createPolyLine(java.lang.String key):

Quote:
IPolyLineChartObject createPolyLine(java.lang.String key)
Creates IPolyLineChartObject with default parameters.
Parameters:
key - String identifier
Returns:
instance of IPolyLineChartObject



Any help would be appreciated.

Best regards.
--
Hein van Eeden


 
 Post subject: Re: JFOREX-3596 createPolyLine on IChartObjectFactory not working Post rating: 0   New post Posted: Thu 31 May, 2012, 08:08 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
As a temporary workaround consider using the parameter-less createPolyLine method.


 

Jump to:  

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