Skip to content

Add all tools as sub-indicators to SwissArmyKnife#9370

Open
0xpinara wants to merge 1 commit intoQuantConnect:masterfrom
0xpinara:feature-3270-add-all-tools-to-swiss-army-knife
Open

Add all tools as sub-indicators to SwissArmyKnife#9370
0xpinara wants to merge 1 commit intoQuantConnect:masterfrom
0xpinara:feature-3270-add-all-tools-to-swiss-army-knife

Conversation

@0xpinara
Copy link
Copy Markdown

@0xpinara 0xpinara commented Apr 6, 2026

Description

Refactored SwissArmyKnife to compute all five SwissArmyKnifeTool values simultaneously. Each tool is now exposed as a public sub-indicator property (Gauss, Butter, HighPass, TwoPoleHighPass, BandPass), so users no longer need to create separate instances per tool.

The selected tool parameter still determines Current.Value for backward compatibility.

Related Issue

Resolves #3270

Motivation and Context

If a user wanted multiple Swiss Army Knife tools, they had to create one indicator per tool. This refactoring lets a single instance compute all tools at once.

Requires Documentation Change

No

How Has This Been Tested?

  • All existing tests pass (Gauss, Butter, HP, 2PHP, BandPass comparisons against external data)
  • Added SubIndicatorsComputeAllToolsSimultaneously — verifies each sub-indicator matches a standalone instance
  • Added SubIndicatorsResetProperly — verifies all sub-indicators reset after Reset()
  • Added PrimaryToolMatchesCurrentValue — verifies Current.Value equals the selected tool's sub-indicator for every tool type

Types of changes

  • Refactor (non-breaking change that improves implementation)

Checklist

  • My code follows the code style of this project
  • I have read the CONTRIBUTING document
  • I have added tests that prove my fix is effective or that my feature works
  • All new and existing unit tests pass
  • My branch follows the naming convention: feature-3270-add-all-tools-to-swiss-army-knife

Previously, each SwissArmyKnife instance could only compute a single
tool. To use multiple tools, users had to create separate instances.
Now all five tools (Gauss, Butter, HighPass, TwoPoleHighPass, BandPass)
are computed simultaneously and exposed as public properties.

Resolves QuantConnect#3270
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.

Add All Tools to SwissArmyKnife Indicator

1 participant