An accurate calculation of technical analysis indicators with values aligning with those in TradingView.
Project description
PT-BR
Se voce quiser ler em portugues basta clicar aqui
Objective
The initial objective of this repository was to create technical analysis indicators in a way that they would be easy to maintain and highly modular. It was observed that the initial values of the indicators, both by TA-Lib and pandas, had some inaccuracies and needed adjustments. With this in mind, I created this repository specifically to address this issue of inaccuracy.
Installation
To install TradingView Indicators, you need to use the package manager pip:
pip install tradingview-indicators
Example
import pandas as pd
import tradingview_indicators as ta
df = pd.read_csv("BTCUSDT_1d_spot.csv")
source = df["close"].copy()
df["RSI"] = ta.RSI(source, 14)
df["MACD"] = ta.MACD(source, 12, 26, 9).get_histogram
dmi = ta.DMI(df, "close")
df["ADX"] = dmi.adx()[0]
df["DI+"] = dmi.adx()[1]
df["DI-"] = dmi.adx()[2]
df["DI_Delta"] = dmi.di_difference()[0]
df["DI_Ratio"] = dmi.di_difference()[1]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for tradingview_indicators-0.3.7.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 964e9e13fa1f7b0f43967809b89f99a13d2c7834c3cfb1ce61b693261e513929 |
|
MD5 | ac51144a704011d91c6f26b5a30bf6cc |
|
BLAKE2b-256 | cef653647829fb507edc1f76dd4da20c208c38470f566bcb8dccbdcb4930b87a |
Close
Hashes for tradingview_indicators-0.3.7.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e78648f5788c31ba07a2316733b97c81845073829c5c67da8cca029b39fe9bf |
|
MD5 | 5447c75172a2cb05affe2fbe65c78eef |
|
BLAKE2b-256 | 44fe9b9e3f2f9b14d2230ac5d808eed160a1c5a812f6c0dc45534c903511764e |