Skip to content
Algo Trade Analytics Docs

Configure Backtest vs Alerts Matching

Backtest vs Alerts pairs TradingView Strategy Tester events with webhook or CSV alert records. Tolerances decide which records are eligible; they do not decide whether a strategy is ready for live capital.

The analysis opens with these values:

ControlStarting valueEligible alert range
Forward Tolerance5 minutesUp to five minutes after the backtest event
Backward Tolerance1 minuteUp to one minute before the backtest event
Price Tolerance2%Absolute percentage difference from the backtest price

The sliders cover 1–60 minutes forward, 0–10 minutes backward, and 0–10% price difference. The number fields accept a wider range: 0–240 minutes forward, 0–60 minutes backward, and 0–50% price difference.

These are product defaults and input ranges, not recommended values for every strategy. The Smart helper uses imported strategy properties to propose a starting point; validate that proposal against your own records.

For each backtest event, the matcher:

  1. searches from backtest time − backward tolerance through backtest time + forward tolerance;
  2. requires a compatible symbol, direction, and entry/exit type;
  3. requires the absolute price difference to be within Price Tolerance; and
  4. selects the eligible candidate with the smallest absolute time difference; an earlier alert wins an exact tie.

Once an alert is assigned, it is not available to another backtest event. Records left on either side become missing alerts or unmatched alert signals in the results.

  1. Confirm the CSV timezone and timestamp format. A consistent offset should be fixed at the source or import setting before widening a time window.

  2. Find one backtest event and alert that you can identify from raw data by symbol, direction, and entry/exit type.

  3. Start with a narrow boundary that includes that explainable pair. Record whether the alert is before or after the backtest event.

  4. Change only one control at a time. Re-run the analysis and inspect newly paired rows—not only the aggregate match rate.

  5. Stop widening when unrelated alerts become plausible candidates. Repeat the check across several events and market conditions.

  6. Save the date range, source, timezone, and all three tolerance values with the result you intend to compare later.

ChangeUseful whenMain risk
Increase forward toleranceA known alert arrives after the backtest eventA later unrelated alert may pair
Increase backward toleranceA known alert consistently precedes the exported backtest timestampThe analysis can hide a timestamp or intrabar mismatch
Increase price toleranceA known pair uses different price sources or execution contextNearby but unrelated events may become eligible
Tighten a toleranceYou are testing whether a result survives a stricter boundaryExplainable pairs may become unmatched

Do not infer a technical cause from the direction of a difference alone. Confirm it against TradingView alert history, the imported rows, strategy settings, and the webhook receipt record.

The workflow considers this step complete when prior workflow steps are complete, Forward Tolerance is greater than zero, and Price Tolerance is zero or greater. That completion check only enables the analysis; it does not validate the chosen values.

If results look implausible:

  • Everything is unmatched: verify symbol, source counts, timezone, entry/exit type, and direction first.
  • Pairs jump when the window changes slightly: inspect raw rows for dense or duplicate alerts.
  • Many alerts match backward: verify timezone and intrabar calculation behavior.
  • Only large price tolerance works: compare the exact price fields and data sources rather than accepting the aggregate result.