Dukascopy
 
 
Wiki JStore Search Login

Mistakes in Interface IIndicators Documentation
 Post subject: Mistakes in Interface IIndicators Documentation Post rating: 0   New post Posted: Tue 27 Aug, 2013, 06:36 

User rating: 2
Joined: Tue 11 Jun, 2013, 05:24
Posts: 7
Refer to https://www.dukascopy.com/client/javadoc ... ators.html

1. pivot return value
https://www.dukascopy.com/client/javadoc/com/dukascopy/api/IIndicators.html#pivot(com.dukascopy.api.Instrument,%20com.dukascopy.api.Period,%20com.dukascopy.api.OfferSide,%20int,%20int)
Doc incorrectly says double[13] is returned.
Example
onBar() {
  indicators.pivot(Instrument.EURUSD, Period.ONE_MIN, OfferSide.BID, 2, 154)[7]
}

raises ArrayOutOfBoundException

2. gator return value
https://www.dukascopy.com/client/javadoc/com/dukascopy/api/IIndicators.html#gator(com.dukascopy.api.Instrument,%20com.dukascopy.api.Period,%20com.dukascopy.api.OfferSide,%20com.dukascopy.api.IIndicators.AppliedPrice,%20int,%20int,%20int,%20int)
Doc incorrectly says double[3] is returned. 'Positive', 'Negative', 'Zero'
Example
onBar() {
  indicators.gator(Instrument.EURUSD, Period.ONE_MIN, OfferSide.BID, IIndicators.AppliedPrice.TYPICAL_PRICE, 154, 45, 21, 1)[2];
}

raises ArrayOutOfBoundException

3. murrey return value
https://www.dukascopy.com/client/javadoc/com/dukascopy/api/IIndicators.html#murrey(com.dukascopy.api.Instrument,%20com.dukascopy.api.Period,%20com.dukascopy.api.OfferSide,%20int,%20int,%20int,%20int)
Doc lists '[-1/8P]' as the name of the 13th element of the return value. This is a repeat of the 2nd element.
Suggest '[+2/8P]'

4. mama arguments
https://www.dukascopy.com/client/javadoc/com/dukascopy/api/IIndicators.html#mama(com.dukascopy.api.Instrument,%20com.dukascopy.api.Period,%20com.dukascopy.api.OfferSide,%20com.dukascopy.api.IIndicators.AppliedPrice,%20double,%20double,%20int)
Doc lists args
mama(Instrument instrument,
              Period period,
              OfferSide side,
              IIndicators.AppliedPrice appliedPrice,
              double fastLimit,
              double slowLimit,
              int shift)

but this is not correct.
Example
indicators.mama(Instrument.EURUSD, Period.ONE_MIN, OfferSide.ASK, IIndicators.AppliedPrice.CLOSE, 5, 8, 5)

Raises
java.lang.InternalError: Unknown parameter type

5. awesome oscillator's MaType args
https://www.dukascopy.com/client/javadoc/com/dukascopy/api/IIndicators.html#awesome(com.dukascopy.api.Instrument,%20com.dukascopy.api.Period,%20com.dukascopy.api.OfferSide,%20com.dukascopy.api.IIndicators.AppliedPrice,%20int,%20com.dukascopy.api.IIndicators.MaType,%20int,%20com.dukascopy.api.IIndicators.MaType,%20int)
Docu says args for this indicator are
double[] awesome(Instrument instrument,
                 Period period,
                 OfferSide side,
                 IIndicators.AppliedPrice appliedPrice,
                 int fasterMaTimePeriod,
                 IIndicators.MaType fasterMaType,
                 int slowerMaTimePeriod,
                 IIndicators.MaType slowerMaType,
                 int shift)

But IIndicators.MaType.MAMA is not a valid choice for args 6 or 8.
indicators.awesome(Instrument.EURUSD, Period.ONE_MIN, OfferSide.BID, IIndicators.AppliedPrice.WEIGHTED_CLOSE, 89, IIndicators.MaType.KAMA, 13, IIndicators.MaType.MAMA, 2)[2];

Raises ClassCastException


 

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