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.4.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f75078fa33c5eeb89d9acf2f5e62e20d1cd24dff69c6eefaf71539c5ffa535bb |
|
MD5 | 8ea42f712774e48acc5a76e1d27c267f |
|
BLAKE2b-256 | f3013668dec0ce6f4fb1ac9557840190e637d8f950fb61bbd0e36693920901b9 |
Close
Hashes for tradingview_indicators-0.0.4.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0f6915e9bb708ee994756735250d1cc1c2deeda00c3181ad1876821c27ea38d |
|
MD5 | c2181ba7c541c437612700897bd2eb8e |
|
BLAKE2b-256 | 703507f67713a581281eb09ecc8f0c5e11389bf169f1208b0f6924460c0d98bf |