Dear Sir: Correct method : Object[] indicatorResultbb = indicators.calculateIndicator(_currentInstrument, _currentPeriod, new OfferSide[] {OfferSide.BID}, "BBANDS", new IIndicators.AppliedPrice[] {IIndicators.AppliedPrice.CLOSE}, new Object[] {20, 2.0, 2.0, 0}, Filter.WEEKENDS, 13, time, 0); double bbu12 = ((double[]) indicatorResultbb[0])[0]; double bbm12 = ((double[]) indicatorResultbb[1])[0]; double bbd12 = ((double[]) indicatorResultbb[2])[0]; I can use these above bbu
Wrong method: but I want use KDJ use same ,
Object[] indicatorKD = indicators.calculateIndicator(_currentInstrument, _currentPeriod, new OfferSide[] {OfferSide.BID}, "KDJ", new IIndicators.AppliedPrice[] {IIndicators.AppliedPrice.CLOSE},new Object[] { 5,3,IIndicators.MaType.SMA,IIndicators.MaType.SMA,2,3}, Filter.WEEKENDS, 4, time, 0);
double KD141K = ((double[]) indicatorKD[2])[0]; double KD141D = ((double[]) indicatorKD[1])[0]; double KD141J = ((double[]) indicatorKD[0])[0];
What wrong with the Object ? I want KDJ 5,3,3, SMA,SMA, some thing wrong at new Object[] { 5,3,IIndicators.MaType.SMA,IIndicators.MaType.SMA,2,3}? thanks lots. Best Regards Ben
|