Dukascopy
 
 
Wiki JStore Search Login

DDSJFX-465'Custom Indicators doesnt work in standalone API
 Post subject: DDSJFX-465'Custom Indicators doesnt work in standalone API Post rating: 0   New post Posted: Sun 05 Jun, 2011, 00:54 

User rating: 0
Joined: Wed 25 May, 2011, 22:52
Posts: 5
Location: GB
Hi,

There appears to be the following bugs with Custom indicators when used with the ITesterClient API:

1) The following code in the onStart method of a strategy returns a null indicator.

cators.registerCustomIndicator(SMAOverRSIIndicator.class); // name is SMA_RSI

IIndicator indicator = cators.getIndicator("SMA_RSI");

2) It also appears that the onStart method is not called for the custom indicator even when the following line is executed

Object[] result = context.getIndicators().calculateIndicator(Instrument.EURUSD, Period.THIRTY_MINS, new OfferSide[] {OfferSide.BID}, "SMA_RSI", new IIndicators.AppliedPrice[] {IIndicators.AppliedPrice.CLOSE}, new Object[] {14, 14}, 1);

Any help would be greatly appreciated.

R


 
 Post subject: Re: Custom Indicators does not work in standalone API strate Post rating: 0   New post Posted: Sun 05 Jun, 2011, 22:55 

User rating: 0
Joined: Wed 25 May, 2011, 22:52
Posts: 5
Location: GB
After further experiments I have found that this is not a standalone API problem, but rather any time you use the

registerCustomIndicator(java.lang.Class<? extends IIndicator> indicatorClass)

form to register your indicator. Both in the JForex Platform and the standalone API. It appears that with this form the indicator is not registered properly.


 

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