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.3.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcf454ccf123bb9c65a7f3db68f10f709f2c271f6e508c951df04754d786c205 |
|
MD5 | 2e80ba254d2ba16aafae6f58e654bbeb |
|
BLAKE2b-256 | e2f9f56aa61f78d1bb043c5083f0d3ad2d13bd8b5090a3a24104c92b581f145e |
Close
Hashes for tradingview_indicators-0.3.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e9fb3a945da79a05422330eadd456e5cde563959ba394bdcf0261875e636c19 |
|
MD5 | 61ff5bd57ee871c7ec410ea272649d24 |
|
BLAKE2b-256 | e698faebff95adc40c4350043f1367752679154bbfba57d6dac2b487d98f9cd2 |