Skip to content

ExchangeNotOpenOrderResponseErrorAnalysis

QuantConnect.Lean.Engine.Results.Analysis.Analyses.ExchangeNotOpenOrderResponseErrorAnalysis

Bases: BaseResultsAnalysis

Detects "exchange not open" order response errors. Returns the first sub-test that fires.

issue

issue: str

Gets a description of the exchange-not-open ordering issue.

weight

weight: int

Gets the priority weight for this analysis.

run

run(
    parameters: ResultsAnalysisRunParameters,
) -> Sequence[Analysis]
run(
    logs: Sequence[str], language: Language
) -> Sequence[Analysis]

Signature descriptions:

  • Runs the exchange not open analysis against the provided backtest parameters.

  • Runs the first sub-analysis that produces a match, covering exercise-while-closed and MOC-on-Futures scenarios.

Parameters:

Name Type Description Default
logs Optional[Sequence[str]]

The log lines produced by the backtest.

None
language Optional[Language]

The programming language the algorithm is written in.

None

Returns:

Type Description
Sequence[Analysis]

The results of the first matching sub-analysis, or a single empty response when none match.

single_response

single_response(
    sample: Any, solutions: Sequence[str] = None
) -> Sequence[Analysis]
single_response(
    sample: Any,
    count: Optional[int],
    solutions: Sequence[str] = None,
) -> Sequence[Analysis]

Wraps a single QuantConnect.Analysis in a one-element read-only list.

create_aggregated_response

create_aggregated_response(
    responses: List[Analysis],
) -> Sequence[Analysis]

Filters responses to those with solutions, prefixes the class name, and returns a flat list.

This codeEntityType is protected.

format_code

format_code(code: str, language: Language) -> str

Formats the specified code string according to the conventions of the given programming language.

This codeEntityType is protected.