Skip to content
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

Implement ZigZag (ZZ) indicator #8454

Merged

Conversation

JosueNina
Copy link
Contributor

Description

This pull request introduces the ZigZag indicator, which is used to identify significant price movements and trends by connecting key high and low points in a financial time series. It helps traders and analysts visualize trend changes and potential reversals in the market.

Related Issue

Closes #3179

Motivation and Context

The ZigZag indicator is useful for detecting trend changes and filtering out market noise, which can improve technical analysis by focusing on significant price movements.

Requires Documentation Change

Yes, the documentation should be updated to include usage instructions for the ZigZag indicator and explain the parameters such as sensitivity and minimum trend length.

How Has This Been Tested?

The ZigZag indicator has been tested using unit tests that verify the calculation of the indicator over historical data. The Talipp library was used to compare values and ensure the accuracy of the indicator's output against expected results.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

@JosueNina JosueNina mentioned this pull request Dec 10, 2024
3 tasks
Copy link
Collaborator

@jhonabreul jhonabreul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you! 🚀

Leaving a few comments below

Indicators/ZigZag.cs Show resolved Hide resolved
Indicators/ZigZag.cs Show resolved Hide resolved
Indicators/ZigZag.cs Outdated Show resolved Hide resolved
Indicators/ZigZag.cs Show resolved Hide resolved
Tests/TestData/spy_zigzag.csv Outdated Show resolved Hide resolved
@JosueNina JosueNina force-pushed the feature-3179-zig-zag-indicator branch from 00f96dd to 1e9f82e Compare December 17, 2024 21:55
- Refactored logic to streamline pivot updates and condition checks.
- Exposed PivotType enum to track pivot direction (High/Low).
- Updated CSV processing to reflect pivot type (High/Low).
@JosueNina JosueNina force-pushed the feature-3179-zig-zag-indicator branch from 934a25f to 1e8908f Compare December 20, 2024 22:03
Copy link
Member

@Martin-Molinero Martin-Molinero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 🙌

@Martin-Molinero Martin-Molinero merged commit edd1aea into QuantConnect:master Dec 23, 2024
6 of 7 checks passed
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.

Implement ZigZag Indicator
3 participants