Missing documentation?
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?
What specifically are you missing?
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.
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/
I see. Thank you, however it should be useful to include this also in the docs :)
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.
(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...)
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
@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.
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?
@mrjbq7 Thanks for fast replying. I think integer or constant seems to be enough.
Closing old issue.