feat: implement TD Sequential candlestick indicator (#6620)#9521
Open
ugur-murat-alt wants to merge 1 commit into
Open
feat: implement TD Sequential candlestick indicator (#6620)#9521ugur-murat-alt wants to merge 1 commit into
ugur-murat-alt wants to merge 1 commit into
Conversation
- Add TdSequential indicator implementing Tom DeMark Sequential methodology - Supports Buy/Sell Setup (9 consecutive bars) and Countdown (13 bars) phases - Exposes SetupCount, CountdownCount, IsSetupComplete, IsCountdownComplete, Signal - Includes SupportPrice and ResistancePrice for countdown validation - Detects perfect setups (bars 8/9 with extreme lows/highs relative to bars 6-7) - Add comprehensive unit tests covering all phases and edge cases - Add example algorithm demonstrating indicator usage with SPY - Follows existing Lean codebase patterns for WindowIndicator<IBaseDataBar>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the Tom DeMark (TD) Sequential candlestick indicator as requested in issue #6620. This indicator identifies potential trend exhaustion points through two sequential phases: Setup (9 bars) and Countdown (13 bars).
Implementation Details
Indicators/TdSequential.csWindowIndicatorfollowing existing Lean conventionsSetupCount/CountdownCount- Current phase progress (1-9, 1-13)IsSetupComplete/IsCountdownComplete- Boolean completion statesSignal- Directional trading signal (None/Buy/Sell)SupportPrice/ResistancePrice- Critical thresholds for countdown validationTests/Indicators/TdSequentialTests.csCommonIndicatorTestsfollowing test conventionsAlgorithm.CSharp/TdSequentialExampleAlgorithm.csVerification
TomDemarkSequentialandWindowIndicatorpatternsCloses #6620