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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf5027593041f4a8c9282a2d7edd043fb1fdbe2d553b31666a1a30cb3ef00120 |
|
MD5 | ee82e9da0f30c0a100f16a7b0dae3d74 |
|
BLAKE2b-256 | 73747812f48d87ab0600a59f79f826c6b799cbfecc04d405318cd032b150f188 |
Close
Hashes for tradingview_indicators-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1103009d6e3e74b94c55a0f17c560589e9ed027ddcbc8dc2233d3c3d25462e83 |
|
MD5 | ee9cd64d5691abcb79e56fff21510673 |
|
BLAKE2b-256 | 9a10d4c4d1bfe1734a0ea4a8df978b2fd57fca435f030653a872ecbc7ba21087 |