Dukascopy
 
 
Wiki JStore Search Login

Timing question
 Post subject: Timing question Post rating: 0   New post Posted: Sun 05 Jan, 2014, 21:44 
User avatar

User rating: 2
Joined: Fri 02 Mar, 2012, 22:08
Posts: 200
Location: New Zealand, Dunedin
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


 

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