@quantconnect-team
⚠️ KEY POINT: Both live trading and backtests use QuantConnect as the data provider, yet produce different ADX values for the same dates and same contract.
PROBLEM SUMMARY:
I'm running a live futures trading algorithm (using QuantConnect's data feed with Interactive Brokers as broker) and have discovered significant discrepancies in ADX (Average Directional Index) values between:
1. Live trading (QuantConnect real-time data feed)
2. Historical backtests (QuantConnect historical data)
3. TradingView (reference comparison)
This is particularly concerning because both live and backtest use QuantConnect as the data provider, yet produce different ADX values for the same dates. This creates a critical issue for strategy optimization and deployment.
SETUP DETAILS:
Contract: MYM (Micro Dow Jones) futures
ADX Settings: 14-period daily ADX
Data Provider: QuantConnect (both live and backtest)
Broker: Interactive Brokers (execution only)
Data Source Breakdown:
- Live: QuantConnect real-time data feed
- Backtest: QuantConnect historical futures data
- Reference: TradingView daily ADX (14 period)
ADX Calculation in Code:
```csharp
private AverageDirectionalIndex adx;
// In Initialize()
adx = ADX(symbol, 14, Resolution.Daily);
```Daily ADX Logged At: First bar evaluation (09:30-09:45 ET)
---
OBSERVED DATA (January 30 - February 20, 2026):
┌────────────┬──────────────┬─────────────────┬─────────────────┬────────────────┐
│ Date │ LIVE (QC) │ BACKTEST (QC) │ TradingView │ Max Spread │
├────────────┼──────────────┼─────────────────┼─────────────────┼────────────────┤
│ Jan 30 │ 11.6 │ 11.6 │ 16.20 │ 4.6 │
│ Feb 2 │ 12.8 │ 11.4 │ 15.54 │ 4.1 │
│ Feb 3 │ 11.1 │ 11.5 │ 14.53 │ 3.4 │
│ Feb 4 │ 9.2 │ 11.0 │ 13.58 │ 4.4 │
│ Feb 5 │ 8.1 │ 10.9 │ 13.57 │ 5.5 ⚠️ │
│ Feb 6 │ 9.7 │ 10.9 │ 13.01 │ 3.3 │
│ Feb 9 │ 12.7 │ 11.8 │ 12.66 │ 0.9 │
│ Feb 10 │ 15.3 │ 12.4 │ 12.87 │ 2.9 │
│ Feb 11 │ 15.6 │ 13.1 │ 12.74 │ 2.9 │
│ Feb 12 │ 19.4 │ 14.3 │ 12.17 │ 7.2 ⚠️⚠️ │
│ Feb 13 │ 16.9 │ 14.7 │ 12.30 │ 4.6 │
│ Feb 17 │ 15.5 │ 12.8 │ 12.42 │ 2.7 │
│ Feb 18 │ 13.9 │ 12.5 │ 12.16 │ 1.7 │
│ Feb 19 │ 12.5 │ 12.9 │ 12.38 │ 0.5 ✓ │
│ Feb 20 │ 12.7 │ 12.8 │ 12.71 │ 0.1 ✓ │
└────────────┴──────────────┴─────────────────┴─────────────────┴────────────────┘Statistics:
- Maximum spread: 7.2 points (Feb 12)
- Average spread (all dates): 3.1 points
- Average spread (recent 4 dates): 1.3 points
- Live vs Backtest correlation: 0.73
---
PATTERN OBSERVATIONS:
1. Temporal Pattern - Convergence Over Time:
Early Period (Jan 30 - Feb 6):
- TradingView values consistently HIGHER than both Live and Backtest
- Live and Backtest relatively close to each other
- Average spread: 3.9 points
Middle Period (Feb 10 - Feb 13):
- Live values INFLATED compared to both Backtest and TradingView
- Feb 12 shows extreme divergence (Live: 19.4 vs TV: 12.17)
- Average spread: 4.3 points
Recent Period (Feb 17 - Feb 20):
- ALL THREE SOURCES CONVERGE
- Differences < 0.5 points
- Near-perfect agreement
This convergence pattern suggests data correction/finalization over time.
---
2. Source-to-Source Analysis:
Live vs Backtest:
- Mean difference: +1.20 (Live higher)
- Std deviation: 2.51
- Range: -1.8 to +5.1 points
Live vs TradingView:
- Mean difference: +0.44 (Live slightly higher)
- Std deviation: 3.15
- Range: -4.6 to +7.2 points
Backtest vs TradingView:
- Mean difference: -0.76 (Backtest lower)
- Std deviation: 2.02
- Range: -3.4 to +2.1 points
- Most stable comparison
---
IMPACT ON TRADING STRATEGY:
Example Scenario - Using MIN_ADX Filter:
If I set a minimum ADX threshold of 13 to avoid choppy markets:
February 5 (Extreme Example):
- Live ADX (QC real-time): 8.1 → Algorithm BLOCKS trade ✓
- Backtest ADX (QC historical): 10.9 → Backtest BLOCKS trade ✓
- TradingView: 13.57 → Would ALLOW trade ✗
February 12 (Extreme Divergence):
- Live ADX (QC real-time): 19.4 → Algorithm ALLOWS trade
- Backtest ADX (QC historical): 14.3 → Backtest ALLOWS trade
- TradingView: 12.17 → Would BLOCK trade
This creates a **critical disconnect** between backtest optimization and live performance:
- Optimizing MIN_ADX in backtests yields different behavior than live trading
- Historical analysis becomes unreliable for ADX-based filters
- Strategy parameters cannot be confidently optimized
---
QUESTIONS FOR THE COMMUNITY:
1. Is this a known issue with daily ADX calculation on futures contracts?
2. Why do Live and Backtest ADX values differ when both use QuantConnect data?
- Different daily bar definitions between real-time and historical?
- Data settlement/correction process?
- Time zone alignment issues?
- Different data pipelines for live vs historical?
3. Why does the data converge on recent dates but diverge on older dates?
- Does QuantConnect update/correct historical data over time?
- Are real-time bars preliminary and get finalized later?
- Is there a data reconciliation process?
4. Which ADX source should be considered "ground truth"?
- Live QuantConnect data (what the algorithm actually trades on)
- QuantConnect historical data (what backtests use)
- External reference like TradingView
5. Best practices for handling this discrepancy?
- Should I avoid ADX-based filters entirely?
- Is there a way to align backtest ADX with live ADX?
- Should optimization only use very recent data where convergence occurs?
- Is this specific to futures contracts or a broader issue?
---
CODE VERIFICATION:
I've verified that both live and backtest use identical ADX calculation:
```csharp
private AverageDirectionalIndex adx;
public override void Initialize()
{
var symbol = AddFuture("MYM", Resolution.Minute).Symbol;
adx = ADX(symbol, 14, Resolution.Daily);
}
public override void OnData(Slice data)
{
if (adx.IsReady)
{
var currentADX = adx.Current.Value;
Log($"ADX: {currentADX:F1}");
}
}
```Same code runs in both live and backtest, yet produces different values.
---
ADDITIONAL CONTEXT:
- Live trading algorithm deployed in production since January 30, 2026
- Using QuantConnect data feed with Interactive Brokers as broker
- Trading MYM micro futures
- ADX is critical for regime detection (trending vs choppy markets)
- Discrepancy affects risk management and trade filtering
- Both live and backtest use QuantConnect as data provider, making the discrepancy particularly unexpected
---
REQUEST:
Has anyone else experienced this with daily ADX on futures contracts? Any insights into:
- Root cause of the discrepancy
- Expected behavior of QuantConnect historical data updates
- Best practices for indicator-based optimization when live/backtest differ
Any help understanding this phenomenon would be greatly appreciated. This affects fundamental strategy decisions around using technical indicators for live trading.
---
System Details:
- QuantConnect Live Trading
- Broker: Interactive Brokers (execution only)
- Data Provider: QuantConnect (both live and historical)
- Algorithm Type: Futures scalping with technical indicators
- Data: Daily bars for ADX, minute bars for execution
- Observation Period: January 30 - February 20, 2026
- Programming Language: C#
---
Thank you in advance for any insights or experiences you can share!
Manos P
UPDATE: Price Data Discrepancy Discovered
In addition to the ADX differences documented above, I've found significant
discrepancies in actual price data across QuantConnect live trading, backtests,
and TradingView.
Example from Feb 20, 2026:
Trade Setup:
- Symbol: MYM (Micro Dow futures)
- Direction: SHORT
- Entry Time: 12:10
- Entry Price: €49,432 (backtest) / €49,430 (live)
Price Comparison at 12:24:
- TradingView: €49,275 (1-minute bar close)
- QC Backtest: ~€49,316 (derived from logged P&L)
- Difference: 41 POINTS
Trade Outcomes (same trade, same parameters):
- QC Backtest: Exited 12:31 with profit
- QC Live Trading: Exited 12:53 with loss
- TradingView data: Would suggest different exit behavior than either QC source
All three data sources show different prices and outcomes for the identical trade!
Entry prices are accurate and match across sources, but prices diverge significantly
during the trade lifecycle. This appears to be the same data quality issue affecting
ADX values (documented above) - QuantConnect's real-time data, historical backtest
data, and external market data all show different values.
Impact on Trading:
This makes both backtesting and live trading unreliable:
- Backtest optimization produces strategies that won't perform the same live
- Live trading sees different prices than backtests for the same historical period
- No way to validate if strategy performance is due to logic or data discrepancies
Questions for QuantConnect team:
1. Why do live, backtest, and market data show 41-point price differences?
2. Is there a data revision/cleaning process creating these discrepancies?
3. How can we trust backtest results if they use different data than live trading?
4. Is this related to the ADX discrepancies documented above?
Manos P
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!