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.6.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a25eb5a4fbab06e984c005148ab2c73981db7e9ac19f2686e70d71eeee04420d |
|
MD5 | 1240ef5757c31e6e2a061df4325345bf |
|
BLAKE2b-256 | dfd71041e06fcc303771b7556be626477a60912369935403e78ddf5b35016c68 |
Close
Hashes for tradingview_indicators-0.0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b203eea2abf1aedd25a27998c86cb18e26496a4637585ae18a26af6808e1c8ed |
|
MD5 | da8182049c3ab0cb1b8a31d185c5590f |
|
BLAKE2b-256 | 56eaedf86197bc1e42931b78f5d62cb7081204a5db3341f36f2cb8a0a96f3454 |