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.

Wrong value from OBV indicator? #Can anyone help me.
 Post subject: Wrong value from OBV indicator? #Can anyone help me. Post rating: 0   New post Posted: Wed 22 Jul, 2015, 19:38 

User rating: 0
Joined: Wed 10 Sep, 2014, 10:26
Posts: 7
Location: ThailandThailand
Hi Everyone,

first, I create OBV indicator like this.
Time = history.getBar(Instrument.EURUSD, Period.ONE_HOUR, OfferSide.BID,1).getTime(); 
double obvh[] = indicators.obv(Instrument.EURUSD, Period.ONE_HOUR, OfferSide.BID, IIndicators.AppliedPrice.CLOSE,OfferSide.BID, Filter.ALL_FLATS, 1, Time, 0);

My code works when I start the indicator, but value is wrong. my OBV value less than the real OBV value on chart.

for this case, i suggest API Support recommended to set IndicatorInfo.setRecalculateAll(true) for indicator. Somebody can show me the sample code for this. please sample code that return OBV value like value from chart.


and I still get error message java.lang.ArrayIndexOutOfBoundsException: 1 for this line.
Object[] result =  indicators.calculateIndicator(Instrument.EURUSD, Period.ONE_HOUR, new OfferSide[] {OfferSide.BID}, "OBV",  new IIndicators.AppliedPrice[]{IIndicators.AppliedPrice.CLOSE}, new Object[]{}, 1);

I just need correct value for OBV indicator, Somebody help me for this?.

Thank you for your help in advance.



Apologize for my English.


 
 Post subject: Re: Wrong value from OBV indicator? #Can anyone help me. Post rating: 0   New post Posted: Mon 27 Jul, 2015, 08:54 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please check this


 
 Post subject: Re: Wrong value from OBV indicator? #Can anyone help me. Post rating: 0   New post Posted: Mon 27 Jul, 2015, 09:37 

User rating: 0
Joined: Wed 10 Sep, 2014, 10:26
Posts: 7
Location: ThailandThailand
for this I checked. I test some indicator and those are correct value, but not for OBV ?

can you provide Sample Code (Shot code ) or the way that retrieve correct volume OBV same Chart value.




Apologize for my English.


 

Jump to:  

cron
  © 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