Dukascopy
 
 
Wiki JStore Search Login

JFOREX-2196 : Wrks load of cust ind that calls cust indi
 Post subject: JFOREX-2196 : Wrks load of cust ind that calls cust indi Post rating: 0   New post Posted: Mon 30 Aug, 2010, 17:01 

User rating: 0
Joined: Tue 02 Mar, 2010, 12:18
Posts: 8
Hi there :)

I have created a custom indicator (INDA) that calls a custom indicator (INDB) using:

IIndicator indB = indicatorsProvider.getIndicator("INDB");

Both indicators work well under all conditions that I have encountered so far except for when trying to load them as part of a template or workspace. In these cases INDB loads okay but INDA (the one that calls INDB) does not load at all. Neither is its entry in the [F(x)] button's drop down list or in the "Add Indicator" dialogue.

I suspect that this is because getIndicator("INDB") relies on INDB already being registered in the list of indicators (which is normally done manually through the interface), but at the point that INDA is being initialised (during a workspace load operation) INDB has not yet been registered. Prior manual registration works with templates, which then load okay, however this is not possible with workspaces because when the workspace is refreshed all knowledge of the manual operation is lost.

As a fix, is there some way to determine the order of loading of custom indicators or in some way to account for dependencies between them?

Or as a workaround, is there some code that would allow INDA to register INDB, rather than the user having to do this manually through the interface?

E.g. within the INDA source code there could be something like:

SomeAPIClass.registerIndicator("/path/to/file/indB.jfx");

This is a fairly important issue for me because the indicator is involved in a complex workspace that I would not want to have to manually re-build each time I use it...

Thanks in advance :)
John


 
 Post subject: Re: JFOREX-2196 : Wrks load of cust ind that calls cust indi Post rating: 0   New post Posted: Tue 31 Aug, 2010, 16:04 

User rating: 0
Joined: Tue 02 Mar, 2010, 12:18
Posts: 8
I have found a workaround by compacting the functionality into a single indicator (it wasn't easy!).

However it would be useful to resolve this issue at some point so that the dependencies between custom indicators can be managed during template and workspace loading operations.

Thanks anyway :D


 

Jump to:  

  © 1998-2024 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