Dukascopy
 
 
Wiki JStore Search Login

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

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

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

How to create an IRayLine ChartObject ?
 Post subject: How to create an IRayLine ChartObject ? Post rating: 0   New post Posted: Wed 11 Jan, 2012, 14:01 

User rating: 1
Joined: Tue 12 Jul, 2011, 20:43
Posts: 51
Location: Germany,
Hello support,

When I'm trying to create an IRayLineChartObject with a specified key using the following statement (according to description in API JavaDoc, Interface IChartObjectFactory):
IRayLineChartObject rayLine = chart.getChartObjectFactory().createRayLine("RayLineTest");

I'm getting a RunTime error:
"java.lang.NoSuchMethodException: com.dukascopy.charts.drawings.RayLineChartObject.<init>(java.lang.String) ..."

How can I create an IRayLineChartObject with a specified key properly ?

I'm using Demo client 2.13.38 with API 2.6.38.1 .

Regards
AbsoluteReturner


 
 Post subject: Re: How to create an IRayLine ChartObject ? Post rating: 0   New post Posted: Wed 11 Jan, 2012, 15:32 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
See:
https://www.dukascopy.com/wiki/#Ray_line_prices_by_shift


 
 Post subject: Re: How to create an IRayLine ChartObject ? Post rating: 0   New post Posted: Wed 11 Jan, 2012, 16:52 

User rating: 1
Joined: Tue 12 Jul, 2011, 20:43
Posts: 51
Location: Germany,
My question was, why the method "IRayLineChartObject IChartObjectFactory.createRayLine(java.lang.String key)", which is described in Interface IChartObjectFactory, is not known at runtime.

I want to use two IRayLines in my strategy. If I use the IChartObjectFactory.createRayLine() construction method without key specification, then I'm not sure if this will cause any problems because theese two ChartObjects are not distinguishable by key.

Also I didn't found a separate method in JavDoc to specify the key of an IChartObject / IRayLineChartObject object after it's creation [like IRayLineChartObject.setKey(java.lang.String key)].

Regards
AR


 
 Post subject: Re: How to create an IRayLine ChartObject ? Post rating: 0   New post Posted: Wed 11 Jan, 2012, 17:17 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
AbsoluteReturner wrote:
My question was, why the method "IRayLineChartObject IChartObjectFactory.createRayLine(java.lang.String key)", which is described in Interface IChartObjectFactory, is not known at runtime.
This is a bug which will be fixed with the next release of JForex client. As a consequence, you can't set the key yourself - it gets generated by the platform.
AbsoluteReturner wrote:
I want to use two IRayLines in my strategy. If I use the IChartObjectFactory.createRayLine() construction method without key specification, then I'm not sure if this will cause any problems because theese two ChartObjects are not distinguishable by key.
You can get the key by: IChartObject.getKey(). In addition you can always use the object references, as it is done in the following example:
https://www.dukascopy.com/wiki/#PolyLine_between_prices


 

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