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.7.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654c7e3e8f21a7c4c9569647b1093d53e427cebcb9002c88f32d444588c8c488 |
|
MD5 | f7f84cd45b007c123bc288c4d26019f8 |
|
BLAKE2b-256 | c5c66c8b5975e9e6ae5b63dd233ae8c67f3be76207f070dcd63945a0b79dd099 |
Close
Hashes for tradingview_indicators-0.0.7.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0898fe8520837ad26180735d14fbcd989bc6c11dd3c33bdd9fb5b0d8aee9835c |
|
MD5 | af47c5d580527d1404e11fb9c49c26bf |
|
BLAKE2b-256 | 6b7215961354409315b649451446bbd83ebf8c1397ee475eb3123ed9e4c709fd |