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.3.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e463c1e34bf5fdde54b92b061e48ed811bf9a30ef7f28ea6c46e4d4d22fb8b43 |
|
MD5 | 7e914b014e16e96417ac356652e7b9a6 |
|
BLAKE2b-256 | 04f7493ba97ccf743a10312917b4b9195fe0c20cfba1379d5d57035b47413f07 |
Close
Hashes for tradingview_indicators-0.0.3.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afc52bc3ef5719d7259f31dfa459bae5c9f7eb6bdacd6d51139271e858f7741b |
|
MD5 | 66b423054fe7b958bda826d5e822148c |
|
BLAKE2b-256 | 5109a30799840c9a16be3edd777b4408292e2ffc2914fbad46a1bc477f0dacf3 |