Incomplete historical data for backtesting

Hello,

i am trying to load historical data this way:

iClose(Symbol(), PERIOD_M1, iBarShift(Symbol(), PERIOD_M1,-more than 2 years ago- ));

Normally its no Problem to get any data. But if iam loading data about 2 years before from testing start, it returns 0.0. If i start the backtesting earlier it can load the searched data.

I already tried to set MaxBars to unlimited.

Print((datetime)SeriesInfoInteger(Symbol(),Period(),SERIES_SERVER_FIRSTDATE)); -> shows me the first Date of history–> And this is only round about 2 years past.

i tryed to load older Data with Bars(_Symbol,PERIOD_M1,D’2015.01.01 02:05’,D’2015.12.31 23:55’); but no chance :frowning:

2019.01.05 18:52:59.742 [DAX30]: symbol to be synchronized
2019.01.05 18:52:59.742 [DAX30]: symbol synchronized, 3784 bytes of symbol info received
2019.01.05 18:52:59.746 [DAX30]: history synchronization started
2019.01.05 18:52:59.749 [DAX30]: load 165 bytes of history data to synchronize in 0:00:00.000
2019.01.05 18:52:59.749 [DAX30]: history synchronized from 2005.06.02 to 2018.10.05
2019.01.05 18:52:59.753 [DAX30]: ticks synchronization started
2019.01.05 18:52:59.772 [DAX30]: load 36 bytes of tick data to synchronize in 0:00:00.000
2019.01.05 18:52:59.772 [DAX30]: history ticks synchronized from 2012.09.04 to 2018.09.17
2019.01.05 18:52:59.943 [DAX30],M1: history cache allocated for 944146 bars and contains 346539 bars from 2016.01.04 00:03 to 2017.06.01 23:49
2019.01.05 18:52:59.943 [DAX30],M1: history begins from 2016.01.04 00:03

2016.01.04 —> This is my problem

Like my broker, the history just appears to be available up to a specific year (like 2016), but if you look closely at the M1 chart, you’ll see that bars are subsumed for the first part of the history which makes that data practically useless.

I made a screenshot from the M1 chart of S&P500 / Usa500:
Like my broker, the history just appears to be available up to a specific year (like 2016), but if you look closely at the M1 chart, you’ll see that bars are subsumed for the first part of the history which makes that data practically useless.

I made a screenshot from the M1 chart of S&P500 / Usa500:

This phenomenon can be seen in various chart periods, so be aware at which point the proper candles start.

To know the correct timespan of the history is especially important to know when you want to optimize parameters with the Strategy Tester.

Cheers,