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

keltner_channel_hband incorrect output? #126

Closed
khoing1111 opened this issue Mar 4, 2020 · 3 comments
Closed

keltner_channel_hband incorrect output? #126

khoing1111 opened this issue Mar 4, 2020 · 3 comments

Comments

@khoing1111
Copy link

I take a look at the following code

https://github.com/bukosabino/ta/blob/0.5.11/ta/volatility.py

line 210

It look weird that keltner_channel_hband use self._tp instead of self._tp_high?

    def keltner_channel_hband(self) -> pd.Series:
        """Keltner Channel High Band
        Returns:
            pandas.Series: New feature generated.
        """
        tp = self._check_fillna(self._tp, value=-1)
        return pd.Series(tp, name='kc_hband')
@bukosabino
Copy link
Owner

Hi @khoing1111 ,

You are right. I will fix it asap.

Best,
Dario

@bukosabino
Copy link
Owner

5438c94

fixing bug: keltner channel high band calculation. Also, included percentage band and width band indicators for keltner channel. Also, included 2 ways to calculate the centerline of Keltner Channel: original version (sma of typical price) vs modern version (ema of close)

@bukosabino
Copy link
Owner

The last library version (0.5.15) includes this feature.

pip install -U ta

Thanks @khoing1111

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

2 participants