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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33ac0143eb82b480de18b75fd0e05a0e3a4d47706df2da17fcf96b14517083e3 |
|
MD5 | 0cf1aa42d94cf5f3cebfaa2aed4417c4 |
|
BLAKE2b-256 | 504f7e79f0853c2879d4a5ef58b1e307474fb70704818bee175b6e63fd8bf30f |
Close
Hashes for tradingview_indicators-0.0.3.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5b5e390ccc340f5468bf82eb5742db5338562db74c4274633959b5802803afa |
|
MD5 | 10c370f141ce7e0674ebf07a1341b3a2 |
|
BLAKE2b-256 | bbc2775809d79865ecff9b20763c50cb6897e2323f6d7dde18321d18fbe03057 |