Bentrix Docs
HomePricingDashboard

Look-ahead

When a test uses information that would not have existed at the moment of the decision — the commonest way a backtest lies. Bentrix makes it impossible by construction.

Look-ahead (or look-ahead bias) is a test reading the future: deciding at 10:00 with the 10:00 candle's close, which is not known until 10:59; using a daily high before the day has ended; computing an average over bars that come after the trade.

A test with look-ahead looks better than any real trading can be, because it trades on knowledge nobody had.

How Bentrix prevents it

A strategy in Bentrix emits intents on a clock it does not hold. Bars after the clock do not exist for it — they have not been handed to it. An indicator computes only up to the clock; a higher-timeframe study reads the last closed higher candle by default. Look-ahead is impossible by construction rather than by care.

Assay scripts can be allowed to look ahead for study purposes by two settings in Settings › Assay, both off by default and marked wherever they are on.

A model's forecast exists from the moment it arrived, never from the close it was made for, so a strategy, an alert or an indicator over history reads only what had arrived by then. Read a forecast at its anchor (Settings › Forecast) is the one exception, off by default, marked wherever it reads, and it never reads what has not arrived: when a forecast exists.

Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed