Questions tagged [pandas-ta]

questions related to pandas technical analysis (pandas-ta) library.

Pandas Technical Analysis (Pandas TA) is an easy to use library that leverages the Pandas package with more than 130 Indicators and Utility functions and more than 60 TA Lib Candlestick Patterns. Many commonly used indicators are included, such as:

  • Candle Pattern(cdl_pattern)
  • Simple Moving Average (sma)
  • Moving Average Convergence Divergence (macd)
  • Hull Exponential Moving Average (hma)
  • Bollinger Bands (bbands)
  • On-Balance Volume (obv)
  • Aroon & Aroon Oscillator (aroon)
  • Squeeze (squeeze) and many more.

More info here

38 questions
4
votes
1 answer

pandas ta ema calculation not accurate

When using Pandas TA to calculate the EMA, I realized that the EMA does not match the EMA on trading view. Consider any stock with an EMA of 200. Next, calculate the last EMA with an arbitrary amount of candles. If we pass only 200 candles, the…
Paul Brink
  • 332
  • 1
  • 4
  • 21
4
votes
2 answers

pandas_ta Technical Indicators

I am very new to this, and looking for some help. I have a .csv file which I have pulled into a dataframe. It contains 200 days of tickers, open, high, low & close prices. I am trying to use pandas_ta (sma) to calculate the 10, 50 & 100 day…
Landon Statis
  • 683
  • 2
  • 10
  • 25
1
vote
1 answer

Google Colab ImportError: numpy.core.multiarray failed to import

I have the following colab notebook that has always worked for me, however now I am receiving the following error: "ImportError: numpy.core.multiarray failed to import" How can I fix this problem? I have already tried re-installing pands to no…
1
vote
2 answers

Adding ichimoku to mplfinance chart

ichimoku data is calculated with pandas_ta and i want to add them to ETH chart with mplfinance. import pandas as pd import pandas_ta as ta import mplfinance as mpl import matplotlib.pyplot as…
1
vote
0 answers

ema5 ema21 ta lib not matching with tradingview

I tried below code import yfinance as yf import pandas_ta as ta dfpl = yf.download('TCS.NS',start='2023-01-01',end='2023-01-05',interval='15m') dfpl["EMA5"] = ta.ema(dfpl["Close"],5) dfpl["EMA21"] = ta.ema(dfpl["Close"],21) print(dfpl[20:]) It…
skr
  • 11
  • 2
1
vote
1 answer

How to add avwap to pandas_ta?

I am trying to get anchored vwap from specific date using pandas_ta. How to set anchor to specific date? import pandas as pd import yfinance as yf import pandas_ta as ta from datetime import datetime, timedelta, date import…
Programmer_nltk
  • 863
  • 16
  • 38
1
vote
0 answers

Is there a pandas function to sum over a new calculated value for the previous X rows

I am trying to recreate a portion of the Bollinger Band Width Percentile pine indicator created by The_Caretaker into pandas_ta. The relevant code is: # Pine Script float _basis = ta.sma( close, 13 ) float _dev = ta.stdev ( close, 13 ) _bbw = (…
jzacharuk
  • 2,058
  • 1
  • 16
  • 22
1
vote
1 answer

Python technical analysis library with streaming support

There are good technical analysis libraries for Python like pandas_ta or ta-lib. However, I could not find a way how I can analyze streaming data. Let me explain what I mean. For example, I have an array of 120 intraday (one minute timespan) close…
chm
  • 359
  • 2
  • 11
1
vote
2 answers

Error while using Panadas-TA with backtesting API

I keep getting this error when using any indicator in Panadas-Ta with the backtestingapi here is the code for the indicator and the backtesting api Indicators must return (optionally a tuple of) numpy.arrays of same length as `data` (data shape:…
1
vote
1 answer

python not recognizing pandas_ta module

import requests import pandas as pd import pandas_ta as ta def stochFourMonitor(): k_period = 14 d_period = 3 data = get_data('BTC-PERP',14400,1642935495,1643165895) print(data) data = data['result'] df =…
jason23
  • 13
  • 3
1
vote
1 answer

using multiproccesing with the pandas-ta library

Im trying to use the multiproccesing feature of pandas-ta, an technical analysis library. The example is descriped here https://pythonrepo.com/repo/twopirllc-pandas-ta-python-deep-learning#multiprocessing But i cant get the example too work, the…
Soma Juice
  • 369
  • 1
  • 11
1
vote
2 answers

How can ichimoku lines values ​be obtained with the pandas_ta library in Python?

Anyone familiar with the pandas_ta library? I use the following code to get ichimoku values: ichi = ta.ichimoku(df['high'], df['low'], df['close'], include_chikou=True) Ichi type should be data frame but the output is a 2-member tuple. Does anyone…
Yunus1400
  • 11
  • 1
1
vote
2 answers

Problems with pandas_ta indicators rsi

I try to put 1 por trading strategy when rsi if > 30 and 0 if the previous period if < 30 data['rsi_compra'] = 1 if data.rsi > 30 & data.rsi.shift(periods = 1) < 30 else 0 Raise this error Cannot perform 'rand_' with a dtyped [float64] array and…
1
vote
1 answer

How to apply Pandas TA to a Dataframe with Groupby

I have a dataframe that contains stock data and is grouped by stocks (see attached image for example), the index is each minute of data for each stock and the second column is the stock symbol. I am trying to apply 'Pandas TA' indicators to the…
Tate
  • 25
  • 4
1
vote
2 answers

cannot import pandas_ta library in jupyter notebook

I use jupyter notebook and try to use pandas_ta library. However, I can't import it. the error show that "ModuleNotFoundError: No module named 'dataclasses'" Please help me fix this.
NNN
  • 11
  • 1
  • 2
1
2 3