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.5.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c93795209d7232750429c400620366355c488142385d7348b1ac099256fc1fb6 |
|
MD5 | fa327cbefa2dd476021527e00854fa9f |
|
BLAKE2b-256 | 3e8b654a68dfa4f017cb57067ce628a753d89d4f8bd123571e3c9e935a8b1504 |
Close
Hashes for tradingview_indicators-0.0.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d451e38ff8cb32b13552494ef67eec6ed9dad3b9245d56220d84fcff4da5114f |
|
MD5 | fa3f3129cc7298d19d67fd3f66d1cfee |
|
BLAKE2b-256 | df0417672bdcabb7bc85962a2815bff902a46189bf343e3b8d1b918a48ec1c21 |