I use this for calculating Bollinger bands:
Period eetDaily = Period.createCustomPeriod(Unit.Day, 1, JFTimeZone.EET);
this.dailyFeedDesc = new TimePeriodAggregationFeedDescriptor(myInstrument, eetDaily, OfferSide.BID, Filter.ALL_FLATS);
...
Object[] bb1_2 = this.indicator.calculateIndicator(dailyFeedDesc, new OfferSide[]{OfferSide.BID}, "BBANDS",
new IIndicators.AppliedPrice[]{IIndicators.AppliedPrice.CLOSE},
new Object[]{20, 1.0, 1.0, IIndicators.MaType.SMA.ordinal()}, 3);
double middleValue2 = (double) bb1_2[1];
My platform and chart is set up accordingly, but the values are a bit different. For example (middle line value):
-right value (on chart): 1.01193 (I calculated it manually too)
-wrong value (strategy): 1.00943
The candlesticks are all the same on chart and the strategy, I have checked it.
I also checked this page:
https://www.dukascopy.com/wiki/#Indicato ... _checklistHas anybody any idea why this can happen?
Thank you