Dukascopy
 
 
Wiki JStore Search Login

How can I correct parameters like object?
 Post subject: How can I correct parameters like object? Post rating: 0   New post Posted: Sun 05 May, 2024, 03:01 
User avatar

User rating: 0
Joined: Sat 24 Jan, 2015, 08:01
Posts: 3
Location: China,
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


 

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