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.

Wiki: Create and manage chart objects deprecated?
 Post subject: Wiki: Create and manage chart objects deprecated? Post rating: 0   Post Posted: Sat 17 Mar, 2012, 13:29 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
The example "Create and manage chart objects" in your wiki https://www.dukascopy.com/wiki/#Create_a ... rt_objects displays deprecated functions.
e.g.
IHorizontalLineChartObject hLine = factory.createHorizontalLine("hlineKey",tick.getAsk());

This function is deprecated, see: https://www.dukascopy.com/client/javadoc ... g.Object...)

How to do this now?
Please send me an example.

Dukascopy DEMO ver. 2.14.28.4
JForex API ver. 2.6.60.1


 
 Post subject: Re: Wiki: Create and manage chart objects deprecated? Post rating: 0   Post Posted: Sat 17 Mar, 2012, 20:07 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
Confusing is also HLINE example in https://www.dukascopy.com/wiki/#Chart_object_catalog, which does not work.
It returns an error
java.lang.NoSuchMethodException: com.dukascopy.charts.drawings.HLineChartObject.<init>(java.lang.String, long, double)

It is this line
IHorizontalLineChartObject hLine = chart.getChartObjectFactory().createHorizontalLine("hLine",
    tick.getTime(), price1
);



Please renew the examples in this Wiki, how to do chart objects without deprecation?


 
 Post subject: Re: Wiki: Create and manage chart objects deprecated? Post rating: 0   Post Posted: Mon 19 Mar, 2012, 08:41 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
  1. Please see the updated note at the beginning of the article:
    https://www.dukascopy.com/wiki/#Chart_object_catalog
  2. The horizontal line example has been fixed.
  3. For the particular horizontal line case you would use:
    IHorizontalLineChartObject hLine = chart.getChartObjectFactory().createHorizontalLine();
    hLine.setPrice(0, price);
    chart.addToMainChart(hLine);


 
 Post subject: Re: Wiki: Create and manage chart objects deprecated? Post rating: 0   Post Posted: Mon 19 Mar, 2012, 16:44 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
ok, thanks API Support.

btw: ad 2. how you create a HLINE now
IHorizontalLineChartObject hLine = chart.getChartObjectFactory().createHorizontalLine("hLine", price1 );

is deprecated. ;)


 
 Post subject: Re: Wiki: Create and manage chart objects deprecated? Post rating: 0   Post Posted: Tue 20 Mar, 2012, 17:34 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
SFXbernhard wrote:
btw: ad 2. how you create a HLINE now
Please see the updated note about the deprecation at the beginning of the article:
https://www.dukascopy.com/wiki/#Chart_object_catalog


 
 Post subject: Re: Wiki: Create and manage chart objects deprecated? Post rating: 0   Post Posted: Wed 21 Mar, 2012, 16:04 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
Thanks for your clarification.


 

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