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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f04ac32b504c9df21cce683a60bdfd527be9f08d4ce438cbdfe2b17a7f3c8e17 |
|
MD5 | bf1be3e988b5d570b7aa5077a83ba2d2 |
|
BLAKE2b-256 | 56bd8c545322aab0417c5076b17ef9f9587b33a0fe22bae668a60641bef262f6 |
Close
Hashes for tradingview_indicators-0.1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc5f47c42383d1390b6035b71691bfb474fbaefcffba5e76f3f337cb6025e153 |
|
MD5 | 32e0dc1119f160cd5d2a1ddaaa15479d |
|
BLAKE2b-256 | 9e9f59904ca5fdb970eb0732bfc36aaeeb9b96d3bd277102a73ac5d3a94f3531 |