Add WaveTrend Oscillator indicator#9419
Closed
AlexCatarino wants to merge 1 commit into
Closed
Conversation
7bd18da to
bf14692
Compare
Implements `WaveTrendOscillator` (BarIndicator) per issue QuantConnect#6411. Adds the indicator class, the `WTO` helper in `QCAlgorithm.Indicators.cs`, unit tests inheriting `CommonIndicatorTests<IBaseDataBar>`, and the TA-Lib-generated reference CSV under `Tests/TestData/spy_wto.txt`. The indicator's `Current.Value` exposes the main wave trend line (WT1 = EMA of the channel index). A public `Signal` property exposes the signal line (WT2 = SMA of WT1). Formula follows the LazyBear TradingView script: ESA = EMA(HLC3, n1); D = EMA(|HLC3 - ESA|, n1) CI = (HLC3 - ESA) / (0.015 * D) WT1 = EMA(CI, n2); WT2 = SMA(WT1, m) Default parameters: n1=10, n2=21, m=4. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bf14692 to
0dc7e1e
Compare
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
WaveTrendOscillator(BarIndicator) per issue #6411. Adds theindicator class, the
WTOhelper inQCAlgorithm.Indicators.cs, unit testsinheriting
CommonIndicatorTests<IBaseDataBar>, and the TA-Lib-generatedreference CSV under
Tests/TestData/spy_wto.txt.The indicator's
Current.Valueexposes the main wave trend line (WT1 = EMA ofthe channel index). A public
Signalproperty exposes the signal line(WT2 = SMA of WT1). Formula follows the LazyBear TradingView script:
Default parameters: n1=10, n2=21, m=4.
Related Issue
Closes #6411
Motivation and Context
Community request from the QuantConnect forum (linked in the issue). The
WaveTrend Oscillator is a popular momentum indicator that currently has no
native support in LEAN, forcing users to re-implement it in algorithms.
Requires Documentation Change
Yes — please add the following entry to
Documentation/Resources/indicators/IndicatorImageGenerator.pyin theindicatorsdict:All parameters are integer periods, so no
msuffix is required on the C# entries.How Has This Been Tested?
dotnet build QuantConnect.Lean.sln(0 errors)dotnet test Tests/ --filter WaveTrendOscillatorTests(13 passed)@LouisSzeto in the issue; agreement within 1e-4.
Types of changes
Checklist:
feature-<N>-<description>