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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a6e1524cf538eb9d89faba1a94edeb41eb2840ff5bbddd310c2ff3f7b62c7aa |
|
MD5 | ab96d069b7330ffa1f18687a76d0426a |
|
BLAKE2b-256 | a33ed10762d1b7526aa8f64edc8140be021d9fb8ef27af2b2c820f547b814770 |
Close
Hashes for tradingview_indicators-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f1ea772bafc4bc0c3066c1d7c7c0f7cdee709ceb6d90c2b4494174076752a20 |
|
MD5 | ef1cd8062dc68b69f3ef1ec995ce6d7d |
|
BLAKE2b-256 | 5308035fc5aa5a9328229c861da36f7b2e592089211aa1f2159e090d8622a25b |