Skip to content

Report NewHighsNewLows as not ready while no asset is tracked - #9706

Merged
Martin-Molinero merged 1 commit into
QuantConnect:masterfrom
mkzung:bug-9704-new-highs-new-lows-ready
Aug 14, 2026
Merged

Report NewHighsNewLows as not ready while no asset is tracked#9706
Martin-Molinero merged 1 commit into
QuantConnect:masterfrom
mkzung:bug-9704-new-highs-new-lows-ready

Conversation

@mkzung

@mkzung mkzung commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

HasSufficientPreviousDataForComputation is an All over the tracked assets, and All holds over an empty set. IsReady is that predicate, so a NewHighsNewLows with nothing tracked reported itself ready with zero samples, and so did one whose last asset had been removed. Adding Any() in front settles both.

Closes #9704

Related Issue

#9704

Motivation and Context

Add and Remove are public, so a universe that empties reaches the state. ValidateAndComputeNextValue gates on the same predicate, and the HasMissingCurrentPeriodValue check three lines above it is an Any, false on an empty set, so nothing else stopped the call either. NewHighsNewLowsVolume inherits the same base.

Requires Documentation Change

No.

How Has This Been Tested?

Two tests on NewHighsNewLowsTestsBase, so they run for all three derived classes: a fresh indicator and one whose last asset was removed. Six fail without the guard. The NewHighsNewLows tests are 48 green with it.

@Martin-Molinero
Martin-Molinero merged commit 4a6595e into QuantConnect:master Aug 14, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NewHighsNewLows reports IsReady when no asset is tracked

2 participants