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.9.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3864e6382abbf5947780918fa6c58e9f3dc6c5e92ea8c27227bf81f7a9ae5be0 |
|
MD5 | a2ce9d12cf9e8149aea0c8ce9e1633e7 |
|
BLAKE2b-256 | e1bafbb894ea0ce8a947e4bcadb9b9c61606b80564c5545d0c1e9a761d9fc1ef |
Close
Hashes for tradingview_indicators-0.0.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31927a29ec23d7ab304596b26746630b1b534c87e3a27d747636745b3349e593 |
|
MD5 | 8e10d32ea5b7b21646833d538ec25836 |
|
BLAKE2b-256 | 04002e453e94a4f1a1505dd0541c5619e7bba49a952ae26d7dfa55f2b5d3230c |