Stale Fills page: market orders now wait for fresh data instead of always filling on stale prices (Lean #9535, #9563)

Abierto Apto para principiantes
#2,844 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@quantconnect-kronos ya está trabajando en esto.

Desde el 5/11/2026.

  • #2846 de @quantconnect-kronos — abierto

Evaluación

Dificultad
1/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
88/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
html

Línea de trabajo

Empieza por Resources/order-types/stale-fills.html y las páginas de Equity referenciadas que incluyen fill-with-stale-data.php; compara la redacción actual con el comportamiento del engine y el cambio sugerido en el issue. Explica cuándo esperan las órdenes de mercado con datos obsoletos según la resolución de los datos, cómo stale_price_time_span establece el umbral de antigüedad y cuándo aparece la advertencia de precio obsoleto. La tarea estará terminada cuando la página describa correctamente esos casos.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Page

Resources/order-types/stale-fills.html, rendered at https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/trade-fills/key-concepts#06-Stale-Fills (and included by the Equity model's limit / stop / trailing-stop pages via fill-with-stale-data.php).

What it says

The pre-built fill models can only fill market orders with stale data.

What the engine does since Lean PR #9535 (2026-06-18) and #9563 (2026-07-01)

A market order whose best available price is older than StalePriceTimeSpan (default one hour) no longer fills on that stale price in every case. FillModel.InternalMarketFill calls ShouldWaitForFreshDataOnStale, which keeps the order pending (status Submitted) and waits for fresher data when:

  • the asset is subscribed only at hour or daily resolution (always waits), or
  • at minute / second resolution, the latest data end time is more than one resolution bar behind the order submission time.

Only tick subscriptions still fill on the stale price with the Warning: fill at stale price message. When a waiting market order fills, it fills at the open of the bar trading resumed on when the order was resting before that bar (GetMarketFillPrice, hour/daily only).

Verified on a backtest on LEAN 18226: a market order on a minute-resolution Binance crypto future whose last cached bar ended two hours before submission stayed Submitted until newer data arrived, then filled.

Suggested change

Describe the wait: a market order on data older than StalePriceTimeSpan fills immediately only on tick data; on minute/second data it waits when the data is more than one bar behind the order time, and on hour/daily data it waits for the next bar; stale_price_time_span sets the age threshold. The same page could mention that the warning message is attached only when the order does fill on stale data.

Lenguaje dominante
HTML
Estrellas
267
Forks
190
Merge medio
8 h 38 min
PR fusionados (30 d)
69

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de QuantConnect/Documentation

Todos los issues de QuantConnect/Documentation

Issues similares

Más issues de Documentation

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.