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.6.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77490464efddeae53f5946eb7e0d1fd74fef65617d406ced31466604bc17298d |
|
MD5 | 8e3a1a1424c26c818475ad327f388ab4 |
|
BLAKE2b-256 | b92c6a1488e6c396e99cf58ba6830ea26398e7b9e0d5bff1d757c9ebc5713ed2 |
Close
Hashes for tradingview_indicators-0.0.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17c18a78a7e1208aa37a5d2ce3b1a8e1c8e989f015aab2841e05fd1f6cd4f068 |
|
MD5 | cfe25bb960b0e303c5d3bc53b8440c13 |
|
BLAKE2b-256 | caf0a466b28df55dc4ab6c558443730531a39566a4bfe96e3411cdd333dc5648 |