Hi
I have the following code in the onBar method:-
if(!period.equals(myPeriod)) return; //myPeriod is set to ONE_HOUR if(!((hour == 0) ||(hour == 6) || (hour == 12) ||(hour ==18))) return
//get the last six hour bars data: Date, Time, OHLC and Volume try {
barList = GetBars(); ..... public List<IBar> GetBars() throwsjava.text.ParseException, JFException { long prevBarTime=myHistory.getPreviousBarStart(myPeriod, myHistory.getLastTick(myInstrument).getTime()); List<IBar> bars = myHistory.getBars(myInstrument,myPeriod, OfferSide.Bid, com.dukascopy.api.Filter.WEEKENDS, 6, prevBarTime, 0); int last = bars.size() - 1; return bars; } .......
What happens on demo account - real time.............
(a) Program commences 8am 4th January, 2014 NZ Time = 7pm GMT 3rd January 2014 I was expecting the program to commence at 7am 4th January, 2014 NZ Time= 6pm GMT 3rd January 2014
(b) The six bars data collected is correct ? i.e. bar data is for the six hour period [midday thru to 6pm GMT 3rd January, 2014]
How does one explain the 7pm kick-off which I expected to be at 6pm ?
Thanks
|