Dear API Support,
I have a strategy which subscribes to a custom indicator and calculates values for this indicator for deciding buy and sell. I use an Object[] array to get the indicator results by shift, like in the example bellow.
Object[] resultByShift = indicators.calculateIndicator(selectedInstrument, selectedPeriod, new OfferSide[] { OfferSide.BID }, indicatorName, new IIndicators.AppliedPrice[] { IIndicators.AppliedPrice.CLOSE }, optionalInputArray, shift);
My question is, can a pass a custom 2 pips bar period in the method above for the calculation of my custom indicator? I understand from wikki that I need to define that custom period and to subscribe to the specific RangeBarListener but unfortunately I couldn't make it work.
I need to run this strategy in LIVE JForex platform which now has API version 2.6.33
Reading the previous forum posts, I found this possible solution bellow which doesn't seem to work on my live jforex plaform:
IFeedDescriptor feedDescriptor = new FeedDescriptor();
feedDescriptor.setDataType(DataType.PRICE_RANGE_AGGREGATION);
feedDescriptor.setOfferSide(OfferSide.BID);
feedDescriptor.setInstrument(Instrument.EURUSD);
feedDescriptor.setPriceRange(PriceRange.valueOf(priceRangePips));
Object[] resultByShift = indicators.calculateIndicator(feedDescriptor, new OfferSide[] { OfferSide.BID }, indicatorName, new IIndicators.AppliedPrice[] { IIndicators.AppliedPrice.CLOSE }, optionalInputArray, shift);
Can you please offer some solution?
Thank you very much in advance!
Iulian