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.

Strategy module, exception Duplicate Chart object key in "another" chart
 Post subject: Strategy module, exception Duplicate Chart object key in "another" chart Post rating: 0   New post Posted: Thu 24 Jan, 2013, 20:32 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
If a Strategy module places objects on a specific chart, it can happen that another chart has exactly that same key identified object (perhaps from a previous run, and the key chart object was not removed).

Is there a way for a Strategy module to iterate through ALL charts and to remove these duplicate keys, so it can proceed on its desired chart?

What is the recommended way of handling this issue in Strategy code from within the JForex platform environment?

I hope that made sense.

HyperScalper


 
 Post subject: Re: Strategy module, exception Duplicate Chart object key in "another" chart Post rating: 0   New post Posted: Fri 25 Jan, 2013, 09:06 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
You can iterate through all charts the following way:
https://www.dukascopy.com/wiki/#Draw_on_all_charts
And then call IChartPanel.getAll(). Note that the key uniqueness is not IChart-bound, rather IChartPanel-bound. Hence, if your strategies draw on indicator panels, then you would also need to iterate through IChart.getIndicatorPanels().


 

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