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.1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 823a7e485de5d2e6d30aad785d28722124a3593527e5a4f5cd0bab5521cd2c13 |
|
MD5 | d538a1cf22896500026f0690b56a02b5 |
|
BLAKE2b-256 | 2807c3793f5fc671431c97198c99f9171f1b0a1869c7048d45067fa8bcd071dc |
Close
Hashes for tradingview_indicators-0.1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4ec79de3256b26253b4429fc4fc28943f01c5e4e862d89bc9db949cca7e25dc |
|
MD5 | a245ba859b5b0c42678e35e24bf8685e |
|
BLAKE2b-256 | 776721099710b94e971b07a2f2fe6fe849474b91c2216825687c9b73f5b2742c |