Data Horizon

Data Horizon decides how much history the app loads for a market. You can keep a rolling length, cap the number of bars, bound the series between two dates, name the first date trading may begin, and read the provided data in a fixed GMT offset.

The settings belong to the app, not to one page: they apply wherever market data is loaded — the strategy backtest, the Optimizer, Walk Forward, Monte Carlo, Multi Market, the Generator, a collection recalculation, and the two data pages that read a market (Data Statistics and Data Export, where the cap shows up as a round bar count). Your data files are never rewritten; the app loads the series and trims it.

Max data bars is on by default with 100,000 bars, which leaves a shorter series whole. The page previews every change, so you see the resulting cut before you leave it.

The page

AreaWhat is in it
Page toolbarThe market selector (Source, Symbol, Period) that picks the market the preview loads, and Reset, which restores every group
Data series settings (left column)The five groups: Data length, Data bars, Data period, Trade start, Timezone shift
Data series preview (right column)The chart of the loaded series with the cut drawn on it, and the preview table under it

The groups are separated by the app's titled splitter lines, and each group is its fields only — the enable checkbox carries the group's name. While a checkbox is clear, the group's inputs are disabled and the group does not apply; tick it and the inputs become editable. The info icon beside a group's name explains the group, and every value control explains the value it takes when you hover it.

Reading the chart

The chart draws the loaded series as one axis in time, from the file's oldest bar to the end of its newest one, and shows what the settings keep of it:

MarkMeaning
Grey axis and its two end dotsThe complete loaded series; the dates below the dots are the file's oldest and newest bar
Blue segmentThe bars the settings keep, with their count under it; it covers the whole axis while no setting cuts anything
Start date and End date ticksThe first kept bar and the end of the last kept bar, drawn above the axis in the blue of the segment they bound. Hover a date for its exact timestamp
Max data bars bracketThe configured cap, counted back from the last kept bar. Its label is the cap you set, not the bars you get
Bars in the data fileThe grey bracket under the axis, with the file's own bar count

Blue marks what the settings keep and grey the file. When the two dates fall close together their labels move apart, while the ticks stay on the real dates. The chart redraws on every change of the market or of a setting, and always reports the same cut as the table below it. A market with no data leaves a note in place of the diagram.

Reading the preview table

The preview applies the current settings to a copy of the loaded series and puts both side by side: Complete series is the market as it arrives, and Data Horizon is what the settings leave of it. Both columns use the selected timezone.

RowMeaning
BarsNumber of bars in the series
Data start / Data endFirst bar, and the end of the last bar, on the app timeline
SpanFirst bar to the end of the last bar, rounded to whole days
Quality scoreComposite quality read in percent: completeness first, with penalties for inconsistent bars and unexpected gaps
CompletenessObserved bars as a percentage of the open bars the series is expected to hold, after the inferred sessions, weekends and fixed-date holidays
Average spread / Average gapMean spread, and the mean absolute gap between a bar's open and the previous bar's close, in points
Inconsistent barsBars whose OHLC values contradict each other by more than one point

The figures are recalculated for each column with the same model the Data Statistics page uses. Compare the same market, timezone and range: different cuts can infer different trading pauses, so they can report different quality figures.

Data length

Keeps the last N days, weeks, months or years of the series.

ControlValues
Data lengthEnable checkbox, off by default
Length1 to 1,000,000
UnitDays, Weeks, Months, Years (Years by default)

The window is counted back from the last bar the other groups keep, so it stays rolling: it always ends where the series ends. A month counts as 30 days and a year as 365, so a length in months or years is approximate in calendar terms.

Data bars (Max data bars)

Caps the number of bars. It is the cheapest way to keep a long-history market fast, and it is on by default.

ControlValues
Max data barsEnable checkbox, on by default
Bars300 to 10,000,000 (100,000 by default)

The oldest bars go first, so the series still ends at the market's newest bar.

Data period (Start date and End date)

Bounds the series between two dates. Each date has its own checkbox, so you can set one, the other, or both.

ControlValues
Start dateEnable checkbox, off by default; 1990-01-01 to 2050-12-31
End dateEnable checkbox, off by default; 2000-01-01 to 2050-12-31

The start date keeps its own day. The end date does not: it keeps the bars before that midnight, so the day you name is dropped. Name the day after the last day you want to test.

Trade start (Trade start date)

Sets the first date the backtester may open a trade.

ControlValues
Trade startEnable checkbox, off by default
Date1990-01-01 to 2050-12-31

It cuts nothing: the bars before the date stay loaded and warm up the indicators, so neither the chart nor the preview table changes while it is the only group enabled. A date before the loaded data start is ignored, and the page warns when the trade start is not after the data start, because that leaves no warm-up.

Use Data period's start date as the warm-up lead-in and Trade start as the real trading boundary to line a test up with a MetaTrader tester window.

Timezone shift

Relabels the provided market data in one fixed GMT offset.

ControlValues
TimezoneEnable checkbox, off by default
OffsetOne entry per zone, (GMT±HH:MM) City, Region, UTC−12:00 to UTC+14:00

The app timeline is GMT, and the provided feeds are stored and served in GMT (the data feed resolves each broker's own daylight saving schedule before serving), so the shift moves no bar in time: it changes the clock labels on the timeline only.

  • Each entry carries its zone's standard (winter) offset and never follows daylight saving, so a city label is exact for that city's winter and one hour off its summer wall clock. To follow a city's sessions, pick the offset that city is in during the period you test.
  • The dates you type in the groups above are read on the same clock, so with the shift on they move with it: a Start date of 2024-01-01 means midnight of that offset.
  • The shift covers provided markets only. Custom data — the .bar.bin files you import — is never shifted, so provided and custom data can sit on different clock bases.
  • Disabled is the default, which leaves the provided data on plain GMT.

Compare the app's charts with your MetaTrader chart to check session alignment. MetaTrader shows broker server time, typically GMT+2 in winter and GMT+3 in summer for a European broker: leave the shift disabled to work in GMT, or select the broker's winter offset and expect the one-hour summer difference.

Timezone shift and the exported Expert Advisor

Clock-based rules (Trade start, Entry Hours, Exit Hours, and the session and Friday closes) are baked into the exported Expert Advisor from the app timeline:

  • With the shift disabled the baked times are GMT.
  • With the shift enabled the baked times carry that fixed offset, while the Expert compares them against the MetaTrader server clock, so the live Expert trades at a constant offset from its backtest.

For MetaTrader parity, keep the shift disabled and align the tester window with Trade start.

How the limits combine

The groups are applied in one pass, in this order:

StepWhat it does
1Start date drops the bars before it
2End date drops the bars from it on
3Max data bars keeps the newest N bars of what is left
4Data length keeps the last N days, weeks, months or years of what is left
5The 300-bar floor widens a window shorter than 300 bars back to 300, counted back from its last bar

So a bar has to pass every enabled group to be kept, and the narrowest cut decides. The one exception is the floor: the app never hands you fewer than 300 bars, so a one-day length on a 100,000-bar file still leaves 300 bars. A series that itself holds fewer than 300 bars is left whole, untrimmed.

The timezone shift is not part of this pass: it relabels the timeline before the cut is measured, and it reloads the market instead of recutting it.

Defaults and Reset

The Reset button in the page toolbar restores every group at once. The groups have no reset of their own, so a reset always covers the whole page.

GroupDefault
Data lengthDisabled, 5 Years
Data barsEnabled, 100,000 bars
Data periodBoth disabled, 2000-01-01 to 2030-12-31
Trade startDisabled, 2000-01-01
Timezone shiftDisabled, (GMT+00:00) Coordinated Universal Time

Reset does not save on its own: the restored values are saved with the rest when you leave the page.

Saving

  • The form checks its values as you go: an out-of-range number or date is reported when the control loses focus, and the date inputs accept nothing outside their range.
  • The settings are saved when you leave the page, not on every change. Other pages keep using the saved values until then; the preview on this page already shows the values you are editing.
  • The Settings page's Download and Upload move these values with the rest of your configuration in one settings file, and its Reset all settings restores them too.

Common problems

SymptomCause
I asked for one day and got 300 barsThe 300-bar floor. A window shorter than 300 bars is widened back to 300, so that is the shortest series you can make from a longer file
The last day I want to test is missingThe end date is exclusive: the bars of that day are dropped. Name the day after the last day you want
The Data Horizon column equals the Complete seriesNothing cuts: either every group is disabled, or the limits you set are wider than the file. Trade start never changes the preview
Fewer bars than the Max data bars cap allowsAnother group cut more; the narrowest cut decides, and the cap counts back from the last bar the dates keep
The dates I entered moved when I enabled the timezoneThe shift relabels the timeline and the date filters are read on it. Keep the shift disabled to enter dates in GMT
The chart shows a note instead of a diagramThe market has no data for your account, or the data is still loading. The app's data-loading message names the reason