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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 855bd02cb3679828b7b4f363e9e2d6b0b6aef2a0267f8e2325ca81563a78c717 |
|
MD5 | 5ddc2273b60448c5d4a7d5364247aeea |
|
BLAKE2b-256 | 24e2ee3dd6b6d7e0a47034496d555c0e400ec259304144c85b6882d429edfbce |
Close
Hashes for tradingview_indicators-0.0.7.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08ca9e0cd7a98c2648257bef1800757f3fa704f61c7be5d26be7bfe2e3fa4aaf |
|
MD5 | 383d4a68033b27efae1015c4ab3187ed |
|
BLAKE2b-256 | 93d912d31f1cc4e7451b018ae2af3e74b99486de5a9e8da6fd5c217423b23344 |