Add WaveTrend Oscillator indicator (#6411)#9421
Closed
AlexCatarino wants to merge 1 commit into
Closed
Conversation
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
WaveTrendOscillatorindicator (bar-based composite) per the linked issue. Adds the indicator class, theWTOhelper inQCAlgorithm.Indicators.cs, unit tests inheritingCommonIndicatorTests<IBaseDataBar>, and a TA-Lib generated reference CSV underTests/TestData/spy_wto.csv.The oscillator is computed as:
Defaults:
channelPeriod=10,averagePeriod=21,signalPeriod=4, giving a warm-up of 42 bars.Related Issue
Closes #6411
Motivation and Context
The WaveTrend Oscillator is a popular momentum oscillator used to identify overbought and oversold conditions and potential trend reversals via crossovers between its two lines. It has been requested by the community (see linked issue and forum discussion) and is currently missing from the LEAN indicator library.
Requires Documentation Change
Yes — add the following entry to
Documentation/Resources/indicators/IndicatorImageGenerator.py(in theindicatorsdict):How Has This Been Tested?
dotnet build QuantConnect.Lean.slnsucceeds.dotnet test Tests/QuantConnect.Tests.csproj --filter FullyQualifiedName~WaveTrendOscillatorTests— 15/15 pass.talib.EMA/talib.SMA) on SPY daily data from the LEAN public data repository, matching within1e-4for bothWT1and the signal lineWT2.Types of changes
Checklist:
feature-<issue>-<description>