Skip to content
Algo Trade Analytics Docs

Analysis Configuration

The Analysis Configuration section defines the tolerances used to match backtest trades with real-time alerts. These settings determine how strict or lenient the matching algorithm is when pairing signals.


Perfect timestamp and price matches are rare in real-world trading. Network latency, bar timing differences, and market volatility all introduce small variations. The configuration settings let you define acceptable thresholds for these differences.

The goal: Match signals that represent the same trading intent, even if they differ slightly in timing or price.


Max Time Difference — The maximum number of minutes an alert can occur after a backtest signal and still be considered a match.

SettingDefaultRange
Max Time Diff5 minutes1-60 minutes

How it works:

  • A backtest signal at 09:30:00 with 5 min tolerance matches alerts from 09:30:00 to 09:35:00
  • Alerts before the backtest signal are evaluated separately (see Backward Tolerance)

Recommendations by strategy type:

Strategy TypeRecommendedReasoning
Scalping (1-5 min)1-2 minutesPrecision is critical
Day Trading (15-60 min)5 minutesSmall delays acceptable
Swing Trading (4H+)15-30 minutesBar timing varies more
Position Trading (Daily)30-60 minutesDaily bar close times vary

Backward Time Tolerance — How many minutes before the backtest signal an alert can occur and still match.

SettingDefaultRange
Backward Tolerance1 minute0-30 minutes

Why this matters:

  • Alerts can sometimes fire slightly before the bar closes
  • calc_on_every_tick=true strategies may alert before final bar confirmation
  • Network routing can occasionally cause out-of-order delivery

Use cases:

SettingWhen to Use
0 minutesStrict matching, alerts should never precede backtest
1 minuteDefault, allows for minor timing variations
5+ minutesFor strategies with known early-alert behavior

Max Price Difference — The maximum percentage difference between backtest price and alert price for a valid match.

SettingDefaultRange
Max Price Diff2%0-10%

How it works:

  • Calculated as: |backtest_price - alert_price| / backtest_price × 100
  • A 2% tolerance on a $100 stock allows ±$2 price difference

Recommendations by asset type:

Asset TypeRecommendedReasoning
Large Cap Stocks0.5-1%Low volatility, tight spreads
Small Cap Stocks2-3%Higher volatility
Crypto3-5%Extreme volatility possible
Forex0.2-0.5%Very tight spreads
Options5-10%Wide bid-ask spreads

The analysis engine uses these tolerances in a multi-step process:

  1. For each backtest trade, identify all alerts within the time window:

    (backtest_time - backward_tolerance) to (backtest_time + forward_tolerance)
  2. From the time-filtered alerts, keep only those within the price tolerance:

    |alert_price - backtest_price| ≤ (backtest_price × price_tolerance%)
  3. If multiple alerts qualify, select the one with:

    • Smallest time difference (primary)
    • Smallest price difference (tiebreaker)
  4. Each backtest trade is classified as:

    • Matched — Found a qualifying alert
    • Missed — No alert within tolerances

    Each alert is classified as:

    • Matched — Paired with a backtest trade
    • False Alert — No corresponding backtest trade

Understanding how tolerance changes affect your results:

EffectResult
⬇️ Time toleranceMore “missed alerts” if timing varies
⬇️ Price toleranceMore “missed alerts” if prices diverge
OverallHigher precision, but may miss valid matches
EffectResult
⬆️ Time toleranceMay incorrectly match unrelated signals
⬆️ Price toleranceMay match signals from different events
OverallHigher match rate, but potential false positives

These strategies recalculate on every price update, which can cause:

  • Alerts firing before bar close
  • Multiple alerts per bar (only one survives in backtest)

Recommended settings:

  • Backward tolerance: 3-5 minutes
  • Time tolerance: 5-10 minutes
  • Consider enabling “Ignore calc_on_every_tick” filter if available

Strategies using market orders execute immediately, so:

  • Price slippage is expected
  • Time should be precise

Recommended settings:

  • Time tolerance: 2-5 minutes
  • Price tolerance: 2-3%

Limit orders may fill at different times/prices than the signal:

  • Price should match the limit price
  • Time may vary significantly

Recommended settings:

  • Time tolerance: 15-30 minutes
  • Price tolerance: 0.5-1%

The Analysis Configuration step is marked complete (✓) when:

  • Time tolerance is set (any value > 0)
  • Price tolerance is set (any value ≥ 0)
  • All previous steps are complete

Once all four workflow steps show checkmarks, the “Ready to Analyze” card appears.


  1. Document your settings — Note which tolerances work for each strategy
  2. Re-run with different settings — Compare results to find optimal values
  3. Match your execution style — Align tolerances with how your strategy actually trades
  4. Consider market conditions — Volatile periods may need looser settings

Cause: Tolerances too tight for your strategy’s behavior.

Solutions:

  1. Review specific mismatches in the Comparison Grid
  2. Check if time differences are consistent (might be timezone issue)
  3. Gradually increase tolerances and re-run

Cause: Tolerances too loose, matching unrelated signals.

Solutions:

  1. Tighten time tolerance first (most impactful)
  2. Reduce price tolerance
  3. Review matched pairs for accuracy

Cause: Mixed signal types with different timing characteristics.

Solutions:

  1. Separate analysis for entry vs. exit signals
  2. Filter to specific signal types
  3. Use different tolerances for different conditions