Hello,
I am trying to get the standard deviation of the last three
daily bars. According to the wiki:
(
https://www.dukascopy.com/wiki/#Indicato ... _Deviation)
long lastBarTime = history.getBar(instrument, Period.ONE_MIN, OfferSide.BID,1).getTime();
long nextToLastBarTime = history.getBar(instrument, Period.ONE_MIN, OfferSide.BID, 2).getTime();
double[] stddev = indicators.stdDev(instrument, period, OfferSide.ASK, AppliedPrice.CLOSE, timePeriod, nbDev, nextToLastBarTime, lastBarTime);
This should return the two stddev values for 2 previous bars. However, the previous code does not compile.
Can you please take a look and tell me how to fix it, and if it does work for daily bars?
How can I get the three latest values insted of only two?
Thank you very much,
SmithJr