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.3.7.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fd4f7b3fc8fd527d11394ea27e33e4e1a5c18d8dbdabcc3921969faeef2fac8 |
|
MD5 | 24ce305c3c80b80bcc0bac4d1b0a846d |
|
BLAKE2b-256 | dc5fe3dd0f75fc37d295543df4ce2e7a62d83caebca1657b8a67f9e63d060ee3 |
Close
Hashes for tradingview_indicators-0.0.3.7.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51fe868b9fbc9e1b955e858f2649052b0e901e6a75dddaa4ddc861510f96c83d |
|
MD5 | fdf54942a530c163fbeee326538a9b78 |
|
BLAKE2b-256 | 943d6fde0a2f4d8701a514d0da9023a445e7aaac6115e6a3b618e2963d0c3861 |