Dukascopy
 
 
Wiki JStore Search Login

JFOREX-1367: Ticks missing for nearly 4 hours
 Post subject: JFOREX-1367: Ticks missing for nearly 4 hours Post rating: 0   New post Posted: Wed 25 Nov, 2009, 08:25 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
I was running a strategy on GBP/USD. On 2009.05.11 02:07 the strategy submitted a trade with a SL=1.5211.0
The trade and SL were correctly registered.
The SL was reached 1st time at 2009.05.11 03:53:30.

However the SL was not triggered and executed by the JForex-engine until more than 3 hours later at 2009.05.11 07:06:58.045.

When debugging this behaviour I found out that the tick data was missing and thus no ticks were processed by the tester-engine between Mon 2009.05.11 03:13:54.670 and Mon 2009.05.11 07:06:58.045

The chart shows bars on all periods except the ticks for the missing 3 hours.

I accidentally stumbled across this gap as the SL of the trade was not executed. I now question, if this happens more often unrecognized. This could of course lead to false trading signals and results in tester.

The question now is why
1) JForex didn't download the data and
2) didn't detect the data gap

JForex could detect inconsistencies in the data by checking bar-data against the last processed tick and take measure (reload data), should there be an inconsistency (i.e. time of last tick processed is before start time of bar, but bar close price not identical with tick price).

The following logging shows the tick-gap:
Quote:
[onTick] ...debug: ticktime=Mon 2009.05.11 03:13:32.987
[onTick] ...debug: ticktime=Mon 2009.05.11 03:13:33.216
[onTick] ...debug: ticktime=Mon 2009.05.11 03:13:37.004
[onTick] ...debug: ticktime=Mon 2009.05.11 03:13:37.124
[onTick] ...debug: ticktime=Mon 2009.05.11 03:13:54.500
[onTick] ...debug: ticktime=Mon 2009.05.11 03:13:54.670
[onBar] ...debug: 01.Period.ONE_HOUR @Mon 2009.05.11 04:00:00.000 lastTick@Mon 2009.05.11 03:13:54.670
[onBar] ...debug: 01.Period.ONE_HOUR @Mon 2009.05.11 05:00:00.000 lastTick@Mon 2009.05.11 03:13:54.670
[onBar] ...debug: 01.Period.ONE_HOUR @Mon 2009.05.11 06:00:00.000 lastTick@Mon 2009.05.11 03:13:54.670
[onBar] ...debug: 01.Period.ONE_HOUR @Mon 2009.05.11 07:00:00.000 lastTick@Mon 2009.05.11 03:13:54.670
[onTick] ...debug: ticktime=Mon 2009.05.11 07:06:58.045
[S01Set81_B5P1T2/2-IND240-GBUS-WENOTRADES-GMT:DK] @Mon 2009.05.11 07:06:58.045 - CLOSE.CONDITION.MET@JF: Long.SL1 met on SELLSide. SL=1.5211.0 >= Curr.Bid=1.5182.5


Best RR.


 
 Post subject: Re: Cache&Tester: Ticks missing for nearly 4 hours Post rating: 0   New post Posted: Fri 27 Nov, 2009, 14:24 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
I would expect, that the close prices (ask, bid) of a bar that gets formed are equal to the prices of the last processed tick.

I've done a run on GBP/USD for the period 5.1.2009 to 24.11.2009 and did check in every onBar call, if the ask and bid price of the last tick processed in onTick is equal to the close prices of the bar. The resulting log has nearly 22.000 entries with differences between the close data of the bars and the tick-data, showing that the tick and bar-data are quite often not in sync!

The log is attached to this posting.

Could you please shed some light on this?

Thanks in advance, RR.


Attachments:
Tickdata-inconsistencies GBP_USD 2009-01-05 to 2009-11-24.zip [346.17 KiB]
Downloaded 543 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 

Jump to:  

  © 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