Questions tagged [ta-lib]

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.

286 questions
2
votes
0 answers

How to Calculate Stocastic RSI using Talib on Multi-Index Dataframe?

I have been trying to calculate Stocastic RSI on multi-index dataframe by using "groupby" symbol, and then calling inline function. Following is the code: df['fastk'],df['fastd'] = df.groupby('Symbol')['Close'].apply(lambda y: talib.STOCHRSI(y,…
baqarjafri
  • 21
  • 1
2
votes
2 answers

In Python, what is the faster way to calculate an EMA by reusing the previous calculations?

I have been using TA-Lib to calculate EMAs but each time I add a new number to the array, TA-Lib performs the calculation from scratch again. I am doing analysis on a rather large set of data (> 1M rows) and this is quite slow. What would be the…
Thomas
  • 10,933
  • 14
  • 65
  • 136
2
votes
0 answers

I am getting an error - no module named for Import ta-lib in Python on Mac

I am getting the following error in Jupyter Note Book when running the code below in Python. import talib I get the following ImportError Traceback (most recent call last) in…
2
votes
0 answers

Installing TA-lib on Python3 (Windows)

I am trying to install TA-lib on my Windows 10 PC, but it is trying to downgrade a lot of the packages to 2.7 (I think). I have the Anaconda distribution of Python 3.7 installed. I am installing it using "conda install -c quantopian ta-lib". When I…
sgelse
  • 21
  • 3
2
votes
1 answer

How to compute Technical Indicators with 1 Minute stock price data?

I am using TA-lib to compute various Technical Indicators. The dataset I have is stock price data for 1 minute intervals. Easiest way is to multiply 390 (390 minutes in a Trading day) with number of days, e.g. To compute 5SMA, SMA(inputs,…
2
votes
1 answer

How to fix zeros in output from RSI calculation with ta-lib in Java?

I'm calculating RSI using ta-lib with Java in a spring-boot application. After spending some time figuring out the function call arguments, I have managed to get an output from the calculation. However, the rsi-function keeps returnings zero values…
2
votes
1 answer

talib computed rsi and exchange rsi look very different

I found some mentions of similar issues but nothing concrete, since im new to data science with python its probably a mistake on my side. I also tried reversing the the input data but both plots seem way to different to look similar to what the…
Sungod3k
  • 73
  • 1
  • 9
2
votes
0 answers

Python ta-lib - Order of time series

Stupid question when doing indicators in python based on a "series" of data. Example ATR,SMA etc what should the ORDER of the series be ? Latest data first or latest data last ?
user914584
  • 571
  • 8
  • 15
2
votes
0 answers

python pandas dataframe talib KAMA function below breaks the execution seems missed certain key input here

In the below line, trying to make the KAMA function to return a calculated value the stockdata is a dataframe that contains OHLC value, here VClose =stockdata['Close'] To calculate the KAMA value and to store it in the same dataframe list , tried…
Marx Babu
  • 750
  • 3
  • 11
  • 34
2
votes
1 answer

Ta-Lib: What is the Idea of Periods in MAVP - (Moving average with variable period)?

I want to use the following function of ta-lib. I want to understand the meaning of periods. MAVP MAVP([input_arrays], [minperiod=2], [maxperiod=30], [matype=0]) Moving average with variable period (Overlap Studies) Inputs: price: (any ndarray)…
user7450524
2
votes
0 answers

Why different results from pandas_talib.MACD() and talib.MACD()?

I am confused by the results. It seems there are multiple versions of MACD calculation to me. If not, why are they different? print(p_df.head()) c timestamp 2017-04-19 2852.0 2017-04-20 2889.0 2017-04-21 …
2
votes
1 answer

ValueError: Length of values does not match length of index (PYTHON)

I'm trying to implement the stochastic indicator in TA-Lib but I'm getting the error above. The error is on the last line. Please see code below: import pandas_datareader as pdr import datetime import pandas as pd import numpy as np import talib as…
RageAgainstheMachine
  • 901
  • 2
  • 11
  • 28
2
votes
0 answers

Proper use of Bollinger Bands in TA-Lib for Python

I'm trying to create a Matplotlib graph that shows Bollinger Bands and price graph of cryptocurrency pairs on the Poloniex Exchange. The bands seem to work when I fetch data for the BTC/ETH pair but not for less active pairs such as BTC/BURST. Here…
Matt Mohandiss
  • 145
  • 2
  • 10
2
votes
1 answer

hplot from bokeh isn't importing correctly to create a histogram

I am receiving this error upon running my code. The main problem is that hplot isn't importing correctly. File "MACD.py", line 10, in from bokeh.plotting import figure, show, output_file, hplot ImportError: cannot import name…
firewater1234
  • 23
  • 1
  • 3
2
votes
1 answer

How to use ta-lib library for technical analysis with C++

I am trying to do some technical analysis of this data using ta-lib library in C++. The problem with ta-lib is that there is very few(most probably none except documentation) tutorials regarding their usage in C++. I converted the open values…
Eka
  • 14,170
  • 38
  • 128
  • 212