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.
Current starting values
Section titled “Current starting values”The analysis opens with these values:
| Control | Starting value | Eligible alert range |
|---|---|---|
| Forward Tolerance | 5 minutes | Up to five minutes after the backtest event |
| Backward Tolerance | 1 minute | Up to one minute before the backtest event |
| Price Tolerance | 2% | 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.
How a pair is selected
Section titled “How a pair is selected”For each backtest event, the matcher:
- searches from
backtest time − backward tolerancethroughbacktest time + forward tolerance; - requires a compatible symbol, direction, and entry/exit type;
- requires the absolute price difference to be within Price Tolerance; and
- 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.
Choose settings from evidence
Section titled “Choose settings from evidence”-
Confirm the CSV timezone and timestamp format. A consistent offset should be fixed at the source or import setting before widening a time window.
-
Find one backtest event and alert that you can identify from raw data by symbol, direction, and entry/exit type.
-
Start with a narrow boundary that includes that explainable pair. Record whether the alert is before or after the backtest event.
-
Change only one control at a time. Re-run the analysis and inspect newly paired rows—not only the aggregate match rate.
-
Stop widening when unrelated alerts become plausible candidates. Repeat the check across several events and market conditions.
-
Save the date range, source, timezone, and all three tolerance values with the result you intend to compare later.
What different changes do
Section titled “What different changes do”| Change | Useful when | Main risk |
|---|---|---|
| Increase forward tolerance | A known alert arrives after the backtest event | A later unrelated alert may pair |
| Increase backward tolerance | A known alert consistently precedes the exported backtest timestamp | The analysis can hide a timestamp or intrabar mismatch |
| Increase price tolerance | A known pair uses different price sources or execution context | Nearby but unrelated events may become eligible |
| Tighten a tolerance | You are testing whether a result survives a stricter boundary | Explainable 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.
Completion and troubleshooting
Section titled “Completion and troubleshooting”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.