|
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.
tick time difference between live and history |
chibimaruko
|
Post subject: tick time difference between live and history |
Post rating: 0
|
Posted: Mon 25 Jun, 2012, 08:03
|
|
User rating: 0
Joined: Mon 25 Jun, 2012, 07:50 Posts: 2
|
hey everyone, dear dukascopy-support-team! when I was comparing arriving ticks from live-mode (Main.java) with downloaded ticks in the historical tester (TesterMain.java) I saw some differences I don't understand. I use the following code to collect the ticks in the onTick method: _lastTime = this._history.getTimeOfLastTick(instrument); ticks = this._history.getTicks(instrument, _beginTime + 1, _lastTime); _beginTime = _lastTime; 2 things I don't understand: 1. why are the tick-times for the same ticks different in Live- and history-mode? e.g. 00.491 vs. 00.334 for the first tick 2. why are there some ticks missing live, but can be found in history, although when collecting live I also use the history.getTicks method? here are some of my results history - 24.06.2012 22:00:00.334,1.25542,1.25517,1.5,0.38
- 24.06.2012 22:00:00.705,1.2554,1.25517,1.5,0.38
- 24.06.2012 22:00:02.254,1.2554,1.2551,1.88,1.5
- 24.06.2012 22:00:02.323,1.25536,1.2551,1.5,0.38
- 24.06.2012 22:00:02.676,1.2554,1.25518,1.5,0.38
- 24.06.2012 22:00:03.012,1.25543,1.25518,3.0,0.38
- 24.06.2012 22:00:03.082,1.25541,1.25518,1.5,0.38
- 24.06.2012 22:00:03.605,1.25541,1.25517,1.5,0.38
- 24.06.2012 22:00:03.734,1.25541,1.25514,1.5,0.38
- 24.06.2012 22:00:03.865,1.25537,1.25512,1.5,0.75
live - 24.06.2012 22:00:00.491,1.25542,1.25517,1.5,0.38 (e.g. same tick history is @ 00.334 )
- 24.06.2012 22:00:00.861,1.2554,1.25517,1.5,0.38 (e.g. same tick history is @ 00.705 )
- missing
- 24.06.2012 22:00:02.660,1.25536,1.2551,1.5,0.38
- 24.06.2012 22:00:02.851,1.2554,1.25518,1.5,0.38
- missing
- 24.06.2012 22:00:03.457,1.25541,1.25518,1.5,0.38
- missing
- 24.06.2012 22:00:03.931,1.25541,1.25514,1.5,0.38
- 24.06.2012 22:00:03.992,1.25537,1.25512,1.5,0.75
thanks in advance!!
|
|
|
|
 |
API Support
|
Post subject: Re: tick time difference between live and history |
Post rating: 0
|
Posted: Mon 25 Jun, 2012, 08:15
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
This is because in-progress ticks get taken from DEMO server, but historical ticks, after synchronization, get taken from LIVE server.
|
|
|
|
 |
chibimaruko
|
Post subject: Re: tick time difference between live and history |
Post rating: 0
|
Posted: Mon 25 Jun, 2012, 14:46
|
|
User rating: 0
Joined: Mon 25 Jun, 2012, 07:50 Posts: 2
|
thank you for the answer... nearly there in my understanding, but still:
so it seems the missing ticks are a problem of the DEMO-account... does that mean, that when I take the data with my live-account, there won't be the "missing" ticks compared to history? or is it the same for live and DEMO account and there are always "ticks added" after the fact in the history-data? sorry for the barrage of questions and thanks in advance
|
|
|
|
 |
API Support
|
Post subject: Re: tick time difference between live and history |
Post rating: 0
|
Posted: Wed 27 Jun, 2012, 07:33
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
chibimaruko wrote: does that mean, that when I take the data with my live-account, there won't be the "missing" ticks compared to history? Yes and you can check this by running the following strategy simultaneously on both LIVE and DEMO accounts: package jforex.data;
import com.dukascopy.api.*;
public class TickPrinter implements IStrategy { private IConsole console; private int counter; public void onStart(IContext context) throws JFException { console = context.getConsole(); } public void onTick(Instrument instrument, ITick tick) throws JFException { if(instrument == Instrument.EURUSD){ console.getOut().println(counter + " " +tick); } } public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {} public void onMessage(IMessage message) throws JFException {} public void onAccount(IAccount account) throws JFException {} public void onStop() throws JFException {} }
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|