Dukascopy
 
 
Wiki JStore Search Login

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.

discrepancy in output of RSI used as vector with one element and two elements
 Post subject: discrepancy in output of RSI used as vector with one element and two elements Post rating: 0   New post Posted: Thu 04 Jul, 2013, 18:12 
User avatar

User rating: 0
Joined: Wed 10 Oct, 2012, 09:47
Posts: 33
Location: GermanyGermany
Dear support,
I got discrepancy in output of indicator when using RSI on onBar method as

double[] rsiFA=indicators.rsi(Instrument.EURUSD, periodbar, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, period_RSI , Filter.ALL_FLATS, 2,bidBar.getTime() ,0);
//here rsiFA is a vector with 2 elements, for last completed bar and previous to it

and

double[] rsiFA_OneBarOnly=indicators.rsi(Instrument.EURUSD, periodbar, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, period_RSI, Filter.ALL_FLATS, 1,bidBar.getTime() ,0);
//here riFA_OneBarOnly is a vector wit 1 element for last completed bar

So rsiFA[1] must be equal to rsiFA_OneBarOnly[0] since these both are RSI indicator with the same parameters for the CLOSE price of last completed bar. But numbers are slightly different. What is my mistake?

Thank you in advance,
your client


 
 Post subject: Re: discrepancy in output of RSI used as vector with one element and two elements Post rating: 0   New post Posted: Fri 05 Jul, 2013, 16:59 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Could you please provide a full example strategy which demonstrates the problem? Describe what you think it does wrong and how it should work instead.


 

Jump to:  

  © 1998-2026 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