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.0.7.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bdb556ea37d104e777265da059c158bb9b30e1ebee3fbc4dd8239feaaeb62fd |
|
MD5 | 3f1e63fc4968666f6e08c788b765da70 |
|
BLAKE2b-256 | 7f8a4b840042f63f3ae88bd1f1868a9be62f0f201cf773a92e3520e39428ccd6 |
Close
Hashes for tradingview_indicators-0.0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 102d27d982e7cccd512d8a4531b8f258e9e92479f55d616cdabb7a3c95ad88ba |
|
MD5 | 75bc978b2f562f9a41140e92e5427627 |
|
BLAKE2b-256 | 7da9142b61d9047e1ce4ce73a289311dfc8b7c678bbcf3bade0751056c40b6a1 |