|
Balance of Power (BOP) - Shift 0 does not return right value |
aspirator
|
Post subject: Balance of Power (BOP) - Shift 0 does not return right value |
Post rating: 0
|
Posted: Mon 08 Oct, 2012, 09:46
|
|
User rating: 0
Joined: Mon 17 Sep, 2012, 14:05 Posts: 25
|
Unfortunately, using shift 0 with the BOP indicator the historical tester always returns the value 0.0.
Extract of the code:
Global variables:
private Instrument currency = Instrument.GBPUSD;
private Period bobPeriod = Period.ONE_HOUR; private Integer bobShift = 0;
Methods:
public double getBopLong() { double bop = -1; try { bop = indicators.bop(currency, bobPeriod, OfferSide.BID, bobShift); } catch (Exception e) { console.getErr().print(e.getMessage()); } return bop; }
public double getBopShort() { double bop = -1; try { bop = indicators.bop(currency, bobPeriod, OfferSide.ASK, bobShift); } catch (Exception e) { console.getErr().print(e.getMessage()); } return bop; }
Shift 1 works fine!
|
|
|
|
|
API Support
|
Post subject: Re: Balance of Power (BOP) - Shift 0 does not return right value |
Post rating: 0
|
Posted: Tue 09 Oct, 2012, 15:08
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
|
aspirator
|
Post subject: Re: Balance of Power (BOP) - Shift 0 does not return right value |
Post rating: 0
|
Posted: Wed 10 Oct, 2012, 12:42
|
|
User rating: 0
Joined: Mon 17 Sep, 2012, 14:05 Posts: 25
|
Thanks but what is meant by this answer?
Either see API 2.7.5 or wait for API 2.7.5 (?) because the only version I can find is 2.7.4! If there's V2.7.5 already available, please provide a link.
Thank you very much.
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|