Skip to content

Missing documentation? #184

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

Closed
blackice999 opened this issue Feb 27, 2018 · 11 comments
Closed

Missing documentation? #184

blackice999 opened this issue Feb 27, 2018 · 11 comments

Comments

@blackice999
Copy link

Hello,

Finally I managed to install this library but the problem is that the documentation's most important parts are missing, specifically the part about all the indicators and it's properties. Where can I find the usage of these indicators?

@mrjbq7
Copy link
Member

mrjbq7 commented Feb 27, 2018

What specifically are you missing?

@blackice999
Copy link
Author

I see that the docs/func_groups directory contains the indicators, but it does not specify a return value for them, or anything close to be a valid function description.

@mrjbq7
Copy link
Member

mrjbq7 commented Feb 27, 2018

Each function has basic docstrings:

>>> import talib
>>> help(talib.MOM)
Help on function MOM in module talib._ta_lib:

MOM(...)
    MOM(real[, timeperiod=?])
    
    Momentum (Momentum Indicators)
    
    Inputs:
        real: (any ndarray)
    Parameters:
        timeperiod: 10
    Outputs:
        real

If you're looking for further documentation on each indicator, you can look at http://tadoc.org/ or the underlying TA-LIb source code:

https://sourceforge.net/p/ta-lib/code/HEAD/tree/trunk/ta-lib/c/src/ta_func/

@blackice999
Copy link
Author

I see. Thank you, however it should be useful to include this also in the docs :)

@mrjbq7
Copy link
Member

mrjbq7 commented Feb 27, 2018

I mean basically those are in the docs already, but in a compressed form:

MOM - Momentum

real = MOM(close, timeperiod=10)

Learn more about the Momentum at tadoc.org.

@mrjbq7
Copy link
Member

mrjbq7 commented Feb 27, 2018

(We could always use better docs, but I have so far chosen to just link to the underlying TA-Lib C library documentation rather than write my own. Maybe it's worth improving it...)

@blackice999
Copy link
Author

Of course, it would be easier to use this wrapper this way, I think. Anyways, thank you for the quick reply and I wish you a pleasant afternoon

@FingerDrill
Copy link

FingerDrill commented Mar 21, 2018

@mrjbq7 Can you give me more information on MACDEXT? Specifically about fastmatype, slowmatype, and signalmatype, I don't know which integer value represents which moving average type.

@mrjbq7
Copy link
Member

mrjbq7 commented Mar 21, 2018

Short answer:

The "moving average types" are integers, mapping to the TA_MAType enum in the underlying C library:

SMA    0    Simple Moving Average
EMA    1    Exponential Moving Average
WMA    2    Weighted Moving Average
DEMA   3    Double Exponential Moving Average
TEMA   4    Triple Exponential Moving Average
TRIMA  5    Triangular Moving Average
KAMA   6    Kaufman Adaptive Moving Average
MAMA   7    MESA Adaptive Moving Average
T3     8    Triple Generalized Double Exponential Moving Average

Long answer:

We've tried a few different approaches, including these constants that were deprecated:

# TA_MAType enums
MA_SMA, MA_EMA, MA_WMA, MA_DEMA, MA_TEMA, MA_TRIMA, MA_KAMA, MA_MAMA, MA_T3 = range(9)

Replaced by a class approach:

class MA_Type(object):
     SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3 = range(9)

And then that got deleted as part of some cleanup, and we're stuck using integers again.

Thanks for reminding me, I forgot to come back and try and clean this up and document it.

Do you have any thoughts about approach here?

@FingerDrill
Copy link

@mrjbq7 Thanks for fast replying. I think integer or constant seems to be enough.

@mrjbq7
Copy link
Member

mrjbq7 commented Jan 20, 2024

Closing old issue.

@mrjbq7 mrjbq7 closed this as completed Jan 20, 2024
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

3 participants