Troubleshoot Backtest vs Alerts
Use this page when Backtest vs Alerts does not reach the result you expect. Change one setting at a time and rerun the comparison so you can tell which change affected the rows.
Run Analysis is not ready
Section titled “Run Analysis is not ready”The workflow is ready only when all four setup cards are complete:
- Data Scope has a start, end, and alert source. CSV Import also needs at least one parsed alert.
- Strategy Properties has both a strategy name and symbol.
- Backtesting Results has at least one parsed event.
- Analysis Configuration has a forward tolerance greater than zero and a price tolerance of zero or more.
Even after the cards complete, Run Analysis stops if no backtest event falls inside the selected range or the chosen alert source contains no signals.
The backtest CSV does not parse
Section titled “The backtest CSV does not parse”First confirm that the file came from TradingView Strategy Tester → List of Trades, not Overview or Performance Summary.
The parser requires:
Date/Time,Date and time, ordateTime; andTypeortype.
Each usable row must also contain entry or exit in Type, and long or
short in either Type or Signal. Invalid timestamps and rows with an
unclear type or direction are skipped.
Use the import panel’s warning list and skipped count rather than editing rows blindly. Compare the file with the parser-tested sample backtest CSV, then see Import backtesting results for the complete recognized-header table.
Webhooks shows zero signals
Section titled “Webhooks shows zero signals”-
Confirm that Webhooks is the selected alert source.
-
Check that the date range covers known saved trade orders.
-
Confirm the Symbol in Strategy Properties matches the saved order symbol.
-
Review the webhook event history and the payload standard.
The setup card can complete before the server query returns a usable signal. The analysis itself still requires at least one alert. To isolate capture from matching, export known alert history and test CSV Import.
The CSV alert import shows zero signals
Section titled “The CSV alert import shows zero signals”Check the detected format and skipped-row warnings. A standard CSV needs a recognized timestamp and positive price, plus an entry/exit type and a usable direction. TradingView Alerts Log exports are detected from their Description and Webhook Status columns, then mapped from the JSON payload.
Use the parser-tested sample alert CSV and the Data Scope reference to compare headers and timezone handling.
No backtest events fall inside the range
Section titled “No backtest events fall inside the range”The imported event count can be greater than zero while the selected date range excludes every event. Check the import date range, then compare it with Data Scope.
If the dates look correct but the clocks do not, correct CSV timestamp timezone, remove the backtest file, and import it again. Do not widen the matching tolerance to compensate for a timezone error.
Most rows are missing or extra
Section titled “Most rows are missing or extra”A match requires the same canonical position direction—entry long, exit long, entry short, or exit short—plus time and price eligibility. Each alert can be used once.
Investigate in this order:
- Use Show only problems and select one distinctive backtest event.
- Find the intended alert and compare position direction.
- Compare timestamps using their source timezone.
- Compare prices and confirm both sources represent the same event.
- Confirm symbol and date-range filtering.
- Change one tolerance only, rerun, and inspect the same row.
An unmatched row identifies a failed rule; it does not prove why the strategy or delivery path diverged.
All timestamps differ by a consistent amount
Section titled “All timestamps differ by a consistent amount”This pattern is evidence of a clock-interpretation issue, but verify it against a known event before changing anything.
- If zone-less backtest timestamps were interpreted incorrectly, choose the correct CSV timestamp timezone and re-import the file.
- If the alert CSV itself uses a different clock convention, correct that source or export it with an explicit offset.
- If only some dates shift, check daylight-saving handling and prefer an IANA timezone such as US Eastern (NYSE) over a fixed manual adjustment.
Alerts appear before the backtest event
Section titled “Alerts appear before the backtest event”The matcher permits a separate backward window, with a current default of one minute. A negative time difference means the chosen alert occurred before the backtest event.
Do not increase the backward window until you have ruled out timezone and event definition differences. A larger window may make an earlier, unrelated alert eligible. See Analysis Configuration.
Entries match but exits do not
Section titled “Entries match but exits do not”Filter the rows by exit direction and compare the corresponding source records. Common observations to verify include:
- no exit alert was captured;
- the alert was normalized as the wrong position direction;
- the backtest and live alert represent different exit conditions; or
- another backtest row consumed the only eligible alert.
These are investigation paths, not automatic diagnoses. Confirm the event pair in TradingView and the captured payload before changing Pine code.
The import warns about zero prices
Section titled “The import warns about zero prices”A backtest row with price 0 or an unparseable price stays in the dataset. The
matcher intentionally evaluates that row on direction and time without applying
price tolerance. Its result therefore lacks useful price-difference evidence.
Re-export or correct the source if price is required for the investigation. Do not treat a zero-price match as confirmation that execution prices agreed.
The strategy scales in, scales out, or pyramids
Section titled “The strategy scales in, scales out, or pyramids”The comparison is a one-to-one event matcher, not a position-lifecycle reconstructor. Each alert can be consumed once, and multiple entries or partial exits can make otherwise related events compete for the same candidate.
The price chart has no bars or markers
Section titled “The price chart has no bars or markers”The row comparison uses the two event datasets and can run without chart bars. For the chart, check:
- the symbol and date range;
- the selected Alpaca key and its market-data feed, if using personal data;
- whether platform market data is enabled for this product; and
- whether the requested market session contains bars.
Missing chart data does not convert a missing alert into a match. Continue the row investigation, then resolve market-data access separately.
Results still show a saved snapshot
Section titled “Results still show a saved snapshot”Choose Live data in the snapshot selector before rerunning. A new analysis clears the loaded snapshot context and recalculates from the current inputs. If the result does not change, confirm that you changed the active workflow input and selected Run Analysis again.
A snapshot cannot be saved
Section titled “A snapshot cannot be saved”A valid report payload must exist, and the account must be below its current snapshot cap. Use the product’s snapshot status as the source of truth because limits can change.
- Run the comparison before saving.
- Narrow the date range if the report exceeds the maximum payload size.
- Delete an unneeded snapshot if the account cap is reached.
- If a snapshot fails to load, return to Live data, refresh once, and retry; do not delete the only copy until the failure is reproducible.
AI Insights is unavailable or fails
Section titled “AI Insights is unavailable or fails”AI Insights requires a completed report, an eligible plan, configured AI credentials, and available credits. The disabled-state message identifies the missing prerequisite.
The AI receives report metadata, summary/configuration, and a bounded issue sample—not every comparison row. If it fails:
- preserve the current report or inputs;
- retry once after checking credentials and credits;
- narrow the date range if the report is unusually large; and
- investigate rows directly if the service remains unavailable.
An AI explanation is a hypothesis. Validate it against the source records and the Pine script before accepting a code change. See AI Insights.
Prepare a useful support report
Section titled “Prepare a useful support report”Include:
- the route and workflow step;
- selected source, symbol, date range, CSV timezone, and tolerances;
- parsed and skipped counts;
- one expected event pair with timestamps, direction, and price;
- the exact error message; and
- a screenshot with credentials and personal data removed.
Do not send API keys, webhook secrets, authorization headers, or complete account exports through an unsecured support channel.