Skip to content

fix: Match StcList to Series and name lists by their arguments - #2351

Merged
DaveSkender merged 1 commit into
catalog-param-rangesfrom
stclist-parity
Oct 12, 2026
Merged

DaveSkender merged 1 commit into
catalog-param-rangesfrom
stclist-parity

Conversation

@DaveSkender

@DaveSkender DaveSkender commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

StcList now matches ToStc at every cycle length, and buffer lists report the arguments they were built with.

StcList fed only bars with a MACD value into a nested StochList, so the stochastic's warmup started at the first MACD value instead of the first bar. At short cycles that left nulls where Series and the stream hub have values. The list now computes the stochastic inline over the full series, as StcHub does.

Eleven buffer lists built Name from their default arguments, so ToString() reported the defaults whatever the list was built with.

Behaviour changes

Call Before Now
ToStcList(1, 1, 2) Null at indices 3–5, where Series gives 0 Matches Series
ToStcList(2, 12, 26) Null at indices 28–29, where Series gives 100 Matches Series
new ChandelierList(10, 2, Direction.Short).ToString(), and the same for ALMA, ATR Stop, Bollinger Bands, Dynamic, Fractal, Renko, Rolling Pivots, Stochastic, StochRSI and T3 lists The default arguments, e.g. CHANDELIER(22, 3, Long) The list's own arguments, e.g. CHANDELIER(10, 2, Short)

Release notes:

  • Fixed: StcList returned nulls where ToStc has values at short cyclePeriods.
  • Fixed: buffer list names for ALMA, ATR Stop, Bollinger Bands, Chandelier, Dynamic, Fractal, Renko, Rolling Pivots, Stochastic, StochRSI and T3 reported default arguments instead of the ones used.

Review notes

  • The default parameters already matched, so existing STC list results at the defaults are unchanged.
  • Names use the invariant culture, as the hubs do. The Fractal list now names both spans, since its two-span constructor is the one every path reaches.
  • The list's stochastic runs on its own bounded buffers rather than a nested StochList, so pruning syncs only the inner MACD list.

@DaveSkender
DaveSkender added this pull request to stack #2365 October 12, 2026 10:35
@DaveSkender DaveSkender changed the title fix: Match StcList to Series and name buffer lists by their arguments fix: Match StcList to Series and name lists by their arguments Oct 12, 2026
@DaveSkender DaveSkender linked an issue Oct 12, 2026 that may be closed by this pull request
@codacy-production

codacy-production Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 7 complexity · -1 duplication

Metric Results
Complexity 7
Duplication -1

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.01% coverage variation

Metric Results
Coverage variation ✅ +0.01% coverage variation (-1.00%)
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (056fb40) 19238 18708 97.25%
Head commit (0086bc4) 19252 (+14) 18723 (+15) 97.25% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#2351) 39 39 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@DaveSkender

Copy link
Copy Markdown
Member Author

Local review: READY at 043fbc2

@DaveSkender
DaveSkender marked this pull request as ready for review October 12, 2026 10:48
@DaveSkender
DaveSkender requested a review from a team October 12, 2026 10:48
@facioquoqa

This comment has been minimized.

@DaveSkender

Copy link
Copy Markdown
Member Author

Local review: READY at 296acae

@DaveSkender

This comment has been minimized.

@facioquoqa

This comment has been minimized.

@facioquoqa facioquoqa Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed StcList against ToStc and StcHub, and the eleven list name changes against their constructors. The warmup index, buffer reset in Clear() and pruning all line up with Series, and every Name maps to the right constructor parameter. Two inline comments follow: one %K boundary difference from Series, and one small allocation in AlmaList.

One note on the PR description: it says names use the invariant culture "as the hubs do", but most hubs (for example AlmaHub and BollingerBandsHub) use plain interpolation, and lists such as KeltnerList, MamaList and ParabolicSarList still do. That is outside this change, but worth a follow-up issue if culture-stable names matter.

Reviewed by the FaciōQuō swarm

Comment thread src/Indicators/r-s/Stc/StcList.cs Resolved
Comment thread src/Indicators/a-b/Alma/AlmaList.cs Resolved
StcList fed only bars with a MACD value into a nested StochList, so
the stochastic's warmup started at the first MACD value instead of
the first bar. At short cycles that left nulls where Series and the
hub have values (cycle 1/fast 1/slow 2 at indices 3-5; cycle 2/12/26
at 28-29). The list now computes the stochastic inline over the full
series, as StcHub does, and matches Series with and without pruning.

Eleven buffer lists built their Name from the default arguments, so
ToString() reported the defaults whatever the list was built with:
ALMA, ATR Stop, Bollinger Bands, Chandelier, Dynamic, Fractal, Renko,
Rolling Pivots, Stochastic, StochRSI, and T3. Each now reports its own
arguments, formatted with the invariant culture.
@DaveSkender

Copy link
Copy Markdown
Member Author

Local review: READY at 0086bc4

@DaveSkender

This comment has been minimized.

@facioquoqa

facioquoqa Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

:neckbeard: FaciōQuōqa Mage code review was completed with comments.
Reviewed the branch head: GitHub had no current merge result for this pull request, so findings describe it as written rather than as merged.

  • Trigger re-review

@facioquoqa facioquoqa Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new issues found in the full PR diff (11 buffer-list Name fixes, the StcList inline stochastic, and the new tests).

  • StcList warmup (_index gate at SlowPeriods + CyclePeriods, MACD window of cyclePeriods, 3-wide raw-K average) matches the CalcStoch path in ToStc; Clear() resets all new state.
  • The earlier exact-boundary rawK note (100/0 at window high/low) is deferred by the author to #2360, which owns the shared helper, so it is not repeated here.
  • Name changes now use the constructor arguments with invariant formatting, and the Fractal two-span name is built where both spans are known.

Reviewed by the FaciōQuō swarm

@DaveSkender
DaveSkender merged commit 7cc7516 into main Oct 12, 2026
@DaveSkender
DaveSkender deleted the stclist-parity branch October 12, 2026 23:52
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StcList disagrees with ToStc at small cycle periods

1 participant