Backtesting on DAX30 data - problem with overnight bars

Report any bugs with the Tickstory Lite software here. Please give as much detail as possible so the issue can be identified and resolved as soon as possible.
Post Reply
smoog_de
Posts: 3
Joined: Sat Jun 04, 2016 5:00 pm

Backtesting on DAX30 data - problem with overnight bars

Post by smoog_de »

Hey guys,

I'm wondering about occurance times of Bars, when backtesting on DAX data in visual mode.

First, I downloaded data for 5 years and exported H1 data in UTC time.
export H1 DAX Data
export H1 DAX Data
Now, in visual mode it seems like the bar occurance times are like random. Sometimes the last bar of day is at 21:00 and starting at 7:00, what i would actually expect (See 1., so weekends are perfectly excluded) But during the weekdays I have Bars that occur overnight (See 2.) and sometimes I have no overnight bars (3.).
weekends and overnight bars
weekends and overnight bars
No overnight bars
No overnight bars
Am I just fool and there is a simple explaination for this?! Otherwise, how can I prevent getting overnight bars? Don't they affect the indicators in a bad way?

Thanks and regards
smoog

tickstory
Posts: 4895
Joined: Sun Jan 06, 2013 12:27 am

Re: Backtesting on DAX30 data - problem with overnight bars

Post by tickstory »

Hi Smoog,

What year are your charts showing? Have you cross-checked the raw data in Tickstory's Data Viewer to see if it corresponds to the charts?

Thanks.

smoog_de
Posts: 3
Joined: Sat Jun 04, 2016 5:00 pm

Re: Backtesting on DAX30 data - problem with overnight bars

Post by smoog_de »

Showing 2015, as you can see in the lower left corner in the pics.

Just crosschecked. Data is as shwon in visual mode.

I have night hours from 19.01.2015 (Mon) to 20.01.2015 (Tue) but none from 24.02.15 (Tue) to 25.02.2015 (Wed).
Night hours
Night hours
No night hours
No night hours

tickstory
Posts: 4895
Joined: Sun Jan 06, 2013 12:27 am

Re: Backtesting on DAX30 data - problem with overnight bars

Post by tickstory »

Thanks, Smoog. If the raw data is the same, then it's an indication that Dukascopy are trading during these times. We'll do a few checks at Dukascopy and see if we can get more information for you.
At the moment there is no option to filter the night session, so we'll have to see how this would be done.

smoog_de
Posts: 3
Joined: Sat Jun 04, 2016 5:00 pm

Re: Backtesting on DAX30 data - problem with overnight bars

Post by smoog_de »

Thx tickstory, would be nice if you could get information about why Dukascopy is providing this data sometimes and if there is a kind of scheme behind it.

But what I am wondering... Is everybody else backtesting on forex data or does anybody has already realized this and has a simple workaround for index-data?

Since, as I mentioned, if you are using indicators on basis of preceding bars in your EA, you could not trust the backtesting result as the indicator sometimes use bars that actually would not exist. Am I wrong?

The only way that comes into my mind is checking the bar opening time manually in the code and decide if the bar is used for calculation (and trading) or not.

tickstory
Posts: 4895
Joined: Sun Jan 06, 2013 12:27 am

Re: Backtesting on DAX30 data - problem with overnight bars

Post by tickstory »

Hi Smoog,

A report has been logged with Dukascopy and they have advised that "if there is a bug, it will be fixed". Just bear in mind that these are derivatives that are being traded, although according to Dukascopy they should match the DAX trading hours:

https://www.dukascopy.com/swiss/english ... ets/?mob=1

In the more immediate term, the answer to your question is yes, it could potentially affect your indicators. Of course, this depends on what particular indicator you're using. Moving averages would obviously be affected depending on look-back values and timeframe. The best short term fix is to ensure your EA trades during market hours (I would recommend this regardless of the instrument you're trading, anyway).

if there is any update from Dukascopy we'll update this thread. You can also perhaps try deleting your Dukascopy Data Store information for the specific day (20th Jan 2015) in a few days to see if any changes were made on Dukascopy's servers.

Hope this helps.

Susanne
Posts: 1
Joined: Wed May 04, 2016 7:39 am

Re: Backtesting on DAX30 data - problem with overnight bars

Post by Susanne »

Hello,

the best solution would be if it is possible to select at the Tickstory-Export-Tab the specific Trading-Hours.

So if I just want Dax data from 8-22h, I just select this in my Tickstory-Export-Tab and then tickstory just uses this Data from Dukaskopy to export. (just the same filter like: From Date - To Date)

Thanks

tickstory
Posts: 4895
Joined: Sun Jan 06, 2013 12:27 am

Re: Backtesting on DAX30 data - problem with overnight bars

Post by tickstory »

Hi - we got the following response from Dukascopy to suggest that this is valid data:
It actually is possible to trade DAX 24/5, depending on the combination of instruments and liquidity providers. Back then in 2015 we had a different system of trading breaks and the providers combination.
We have put an item on our list to filter a single session from the data between a begin and end time (multiple sessions won't be supported at this stage).

Thanks.

Post Reply