-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature 4167 Schaff Trend Cycle indicator #4557
Feature 4167 Schaff Trend Cycle indicator #4557
Conversation
Looks like when it builds my test data in Tests/TestData/spy_stc.txt is not being transferred to the Release test bin. See Travis build error here Can whoever reviews this let me know how to get the test data into the correct directory? |
Closing to restart the test. Failed on something unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the docs and we can merge indicator and put docs in correct location.
8c0ceff
to
1eb40d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and tested!
We forgot one thing! The shortcut helper in QCAlgorithm.Indicators.cs
|
Uh oh, Ill take care of it! |
Description
Addition of a new indicator: Schaff Trend Cycle
Related Issue
Closes #4167
Motivation and Context
Add a new indicator that builds on previous ones. STC takes MACD further and is more responsive to momentum changes.
Requires Documentation Change
Yes, addition of this new indicator to the indicator documentation is required.
How Has This Been Tested?
External data has been added in this PR to run against the indicator using the CommonIndicatorTests. Reference Tests/Indicators/SchaffTrendCycleTests.cs for test setup.
Also in development I worked through the formula using an excel to compare it to a TradingView script's calculation to ensure accuracy of the algorithm. This particular indicator is extremely sensitive as it chains EMAs and Stochastics on top of a MACD calculation so the more data points processed the closer the values become. In the case of TradingView it was able to process data from before the start which leads the beginning STC values to differ greatly in the excel. You will notice after row 120 the variance becomes very minimal.
spy_stc_excel_vs_TV.txt
The test file I included (spy_stc.txt) in this PR goes even further with over 1700 points for an intraday comparison. Running my indicator against this show a very small max +/- 1 variance between the values. To reproduce run SchaffTrendCycleTests.
Types of changes
Checklist:
bug-<issue#>-<description>
orfeature-<issue#>-<description>