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

ADXIndicator.adx_pos / adx_neg head assertion failed #314

Open
mike1936 opened this issue Feb 2, 2023 · 0 comments
Open

ADXIndicator.adx_pos / adx_neg head assertion failed #314

mike1936 opened this issue Feb 2, 2023 · 0 comments

Comments

@mike1936
Copy link

mike1936 commented Feb 2, 2023

Problem

The first non-zero +DI14 is missing when try to calculating them using ADXIndicator.adx_pos.
Same problem with -DI14 and ADXIndicator.adx_neg.

Expectation:

After inserting the following test function to TestADXIndicator in ./test/unit/trend.py, the test should pass

# ...

    def test_adx_pos3(self):
        target = "+DI14"
        result = adx_pos(**self._params)
        pd.testing.assert_series_equal(
            self._df[target].head(15), result.head(15), check_names=False
        )

    def test_adx_neg3(self):
        target = "-DI14"
        result = self._indicator.adx_neg()
        pd.testing.assert_series_equal(
            self._df[target].head(16), result.head(16), check_names=False
        )

# ... 
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

No branches or pull requests

1 participant