|
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.
calculateIndicator don't work for PCHANNEL |
fxdiler
|
Post subject: calculateIndicator don't work for PCHANNEL |
Post rating: 0
|
Posted: Thu 26 Dec, 2013, 13:01
|
|
User rating: 7
Joined: Thu 05 Sep, 2013, 12:43 Posts: 56 Location: Russian Federation, Tomsk
|
Hello, there is a code IBar bar = history.getBar(pInstrument, pPeriod, chart.getSelectedOfferSide(), 1); Object[] outputs = indicators.calculateIndicator(pInstrument, pPeriod, chart.getSelectedOfferSide(), "PCHANNEL", new AppliedPrice[] {}, new Object[]{14}, Filter.ALL_FLATS, 14, bar.getTime(), 0); but it don't compile, an error occurs The method calculateIndicator(Instrument, Period, OfferSide[], String, IIndicators.AppliedPrice[], Object[], Filter, int, long, int) in the type IIndicators is not applicable for the arguments (Instrument, Period, OfferSide, String, IIndicators.AppliedPrice[], Object[], Filter, int, long, int)JForex API https://www.dukascopy.com/client/javadoc ... Descriptor, com.dukascopy.api.OfferSide[], java.lang.String, com.dukascopy.api.IIndicators.AppliedPrice[], java.lang.Object[], int, long, int) What's wrong? Please help.
|
|
|
|
 |
fxdiler
|
Post subject: Re: calculateIndicator don't work for PCHANNEL |
Post rating: 1
|
Posted: Thu 26 Dec, 2013, 13:32
|
|
User rating: 7
Joined: Thu 05 Sep, 2013, 12:43 Posts: 56 Location: Russian Federation, Tomsk
|
Sorry, it's my error. I forgot to create a new OfferSide object. The correct code is Object[] outputs = indicators.calculateIndicator(pInstrument, pPeriod, new OfferSide[]{chart.getSelectedOfferSide()}, "PCHANNEL", new AppliedPrice[]{}, new Object[]{14}, Filter.ALL_FLATS, 14, bar.getTime(), 0);
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|