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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26c862f2b5f7deed044bedd820bbe8109f949396c5a1a7c201e73d0ef8df3909 |
|
MD5 | 864e2038ffe3470855e14a23840084d2 |
|
BLAKE2b-256 | e9ce09c4ee525164948e85146741ab4f7cf9f5eb2b40348168fd5d7507dd12ad |
Close
Hashes for tradingview_indicators-0.0.9.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 034b23ea57dd9f4c253bf6b8390a7660139955f4ac4cbbf626a48e4d55b2f7ef |
|
MD5 | 91a9846cabc24de70c145d3fe898ca94 |
|
BLAKE2b-256 | a306198c65780d5b0e8ab9c45b8f530ec709d68c86fd0e806bf35098e1a7001b |