TA-Lib : Technical Analysis Library. It is widely used by trading software developers requiring to perform technical analysis of financial market data. Includes 200 indicators such as ADX, MACD, RSI, Stochastic, Bollinger Bands and Candlestick pattern recognition. It's an open-source API for C/C++, Java, Perl, Python, PHP and 100% Managed .NET.
Questions tagged [ta-lib]
286 questions
4
votes
3 answers
ModuleNotFoundError: No module named 'talib'
Cannot install ta-lib on MacOS.
pip install ta-lib
How to install it?

Joe Rakhimov
- 4,713
- 9
- 51
- 109
4
votes
4 answers
Is it possible that Mac M1 users are not able to use Python wrapper for TA-Lib?
so I've been trying different methods to install TA-Lib, and found several different methods to install it, none of which have been easy, but even when TA-Lib is installed and appears on pip list, and even managed to install it on pipenv virtual…

Teo
- 97
- 1
- 9
4
votes
2 answers
How can I get the next row value in a Python dataframe?
I'm a new Python user and I'm trying to learn this so I can complete a research project on cryptocurrencies. What I want to do is retrieve the value right after having found a condition, and retrieve the value 7 rows later in another variable.
I'm…

BlowTheFUPA
- 43
- 1
- 1
- 4
4
votes
1 answer
Value error on multiindex pandas dataframe
I am using the package from here. What I am trying to do is to calculate the Stochastic value for each ticker.
I have the following code:
import lxml
from urllib.request import urlopen
from bs4 import BeautifulSoup
import pandas as pd
from pandas…

Slartibartfast
- 1,058
- 4
- 26
- 60
4
votes
0 answers
Talib library non-stochastic function returns inconsistent values
I'm using the MACD function from the talib library. http://www.tadoc.org/indicator/MACD.htm
The function's output is based on moving average of the input values.
Let's create function inputs:
close = np.array([ 2930.8, 2926.3, 2941.5, 2942.9, …

Saeed
- 1,848
- 1
- 18
- 26
4
votes
2 answers
unable to import TA-Lib - Python
I am trying to importTA-Lib in python but getting an error:
Traceback (most recent call last):
File "", line 1, in
File "/home/arque/anaconda3/lib/python3.6/site-packages/talib/init.py", >line 43, in
from ._ta_lib import (
…

Sociopath
- 13,068
- 19
- 47
- 75
4
votes
1 answer
.NET: Can't get correct RSI and MACD values from TA-Lib
I'm trying to use TA-Lib for technical analysis. I downloaded TA-Lib-Core Nuget package for .NET. Unfortunately, I can't find any API documentation so some method parameters are a bit of mystery.
I downloaded historical data for AMD between…

Mark13426
- 2,569
- 6
- 41
- 75
4
votes
2 answers
How is TA-Lib identifying Dojis
I'm trying to fiddle with the TA-Lib functions, trying to understand how they identify patterns.
The following code produces strange results
import talib
import numpy
sample_data = [
['1/22/14', 10, 18, 5, 20],
['1/23/14', 12, 21, …

JB Lepetit
- 211
- 3
- 9
4
votes
2 answers
Python ta-lib with pandas.io.data: candlestick not plotting but other charts are ok
iPython 2.3.1, OS-X Yosemite 10.10.2
Python print (sys.version):
2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
The following code works for data pulled for US stock data e.g. make the security id…

Quantatia
- 91
- 1
- 2
- 5
3
votes
1 answer
Is there an error in Pythons talib.ATR method?
Here is the data:
high = np.array([10697.12, 10706.16, 10744.75, 10747.88, 10745.42])
low = np.array([10683.51, 10694.72, 10705.16, 10728.22, 10727.29])
close = np.array([10696.47, 10705.16, 10728.23, 10742.46, 10730.27])
Method 1: Input the data…

Alex
- 305
- 4
- 10
3
votes
0 answers
Installing TA-Lib on Macbook
I'm trying to get install TA-lib, but running into errors I don't understand.
I installed brew, and ran the following:
brew install ta-lib
That seemed to work because if I re-run that, I get a note that
ta-lib 0.4.0 is already installed and…

JstSomeGuy
- 119
- 7
3
votes
1 answer
Apply function with multiple arguments to pandas groupby object
Following is what my dataframe looks like:
symbol time open high low close
0 AAPL 09:35:00 219.19 219.67 218.38 218.64
1 AAPL 09:40:00 218.63 219.55 218.62 218.93
2 AAPL 09:45:00 218.91 219.09 218.27 218.44
3 …

gibbz00
- 1,947
- 1
- 19
- 31
3
votes
2 answers
Installing TA-Lib on python x64
I'm trying to install TA-Lib on Python, i'm using a x64 version so i can't install Ta-Lib using pip. I'm following these steps to run it but i have not clear the step 4: "Build the library nmake". I have opened the prompt but i don't really know how…

Sile
- 93
- 2
- 8
3
votes
1 answer
/usr/bin/clang command failing trying to pip install TA-lib on MacOS
I'm trying pip install TA-lib and getting this log:
> pip install TA-lib
Collecting TA-lib
Downloading TA-Lib-0.4.10.tar.gz (829kB)
100% |████████████████████████████████| 839kB 822kB/s
Building wheels for collected packages: TA-lib
Running…

Fagui Curtain
- 1,867
- 2
- 19
- 34
3
votes
1 answer
TA-Lib Python Wrapper only length-1 arrays error
Code:
def macd(prices):
print "Running MACD"
prices = np.asarray(prices)
print prices
macd, macdsignal, macdhist = MACD(prices, fastperiod=12, slowperiod=26, signalperiod=9)
print "MACD "+macd
Explanation:…
user3137329