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
File details
Details for the file tradingview_indicators-0.1.1.0.tar.gz
.
File metadata
- Download URL: tradingview_indicators-0.1.1.0.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11f303006f6ef805823dcf153ff9fc765082e09392c5e4cc829ce9eeac79e190 |
|
MD5 | 5ad8d02777ba6ff85b2cab5489a06c30 |
|
BLAKE2b-256 | 95bbeb568ce1dd05e9d76572234e1e173490b50ff7b7ac102b0c35ae95acf33a |
File details
Details for the file tradingview_indicators-0.1.1.0-py3-none-any.whl
.
File metadata
- Download URL: tradingview_indicators-0.1.1.0-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d633c47ae478d0778f0facb70cb5e8c5659431aef487abb86a2ea59254973147 |
|
MD5 | 1d43c0f6886d71a90db7b899518dd6fa |
|
BLAKE2b-256 | 2f52277bc9df51871648d30e407a8b39508995ae6450af3c4612aefb9315ad61 |