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

is TEMA and TRIX adjustable? #47

Closed
7ruth opened this issue Sep 25, 2019 · 5 comments
Closed

is TEMA and TRIX adjustable? #47

7ruth opened this issue Sep 25, 2019 · 5 comments
Assignees
Labels

Comments

@7ruth
Copy link

7ruth commented Sep 25, 2019

are TEMA and TRIX adjustable like other metrics such as .get('tema_20') || .get('trix_35')

Couldn't find on stackoverflow or any other forums so I am at the source : D

Awesome lib!

@jealous
Copy link
Owner

jealous commented Sep 26, 2019

Thanks. Yes, they have.
For example, use close_2_tema to calculate the TEMA base on the close price for a window of 2.
close_3_trix calculate the trix based on the close price for a window of 3.

@jealous jealous self-assigned this Sep 26, 2019
@7ruth
Copy link
Author

7ruth commented Sep 26, 2019

Thank you for such a quick response!

Would you be open to a PR to the documentation/readme with that detail?

I could add it under for example:

# TRIX, default to 12 days
stock['trix']
# MATRIX is the simple moving average of TRIX
stock['trix_9_sma']
# TEMA, another implementation for triple ema
stock['tema']

@7ruth 7ruth closed this as completed Sep 26, 2019
@jealous
Copy link
Owner

jealous commented Sep 27, 2019

Sure. Thanks for the suggestion. I will try to include that in next commit.

@7ruth
Copy link
Author

7ruth commented Sep 28, 2019

Hello, I tried to push a branch with changes to make a PR with the change but not sure if you allow to do that. Thank you for the explanation, just added this to readme, sorry couldn't figure out how to make a PR to make your life easier:

    # TRIX, default to 12 days
    stock['trix']
    # TRIX based on the close price for a window of 3
    stock['close_3_trix']
    # MATRIX is the simple moving average of TRIX
    stock['trix_9_sma']
    # TEMA, another implementation for triple ema
    stock['tema']
    # TEMA based on the close price for a window of 2
    stock['close_2_tema']

@jealous
Copy link
Owner

jealous commented Sep 28, 2019

Em, normally you can fork the repo to your own account. You can always create new branches in your forked repo. And then, you can create a PR from your own repo to this repo.
This change is small, I will do that. Thanks for trying to help. :)

jealous added a commit that referenced this issue Sep 28, 2019
TEMA and TRIX can be adjusted with customized window.  Add sample in the
README.
jealous added a commit that referenced this issue Sep 28, 2019
TEMA and TRIX can be adjusted with customized window.  Add sample in the
README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants