Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tradingview_indicators-0.0.8.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tradingview_indicators-0.0.8.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file tradingview_indicators-0.0.8.0.tar.gz.

File metadata

  • Download URL: tradingview_indicators-0.0.8.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for tradingview_indicators-0.0.8.0.tar.gz
Algorithm Hash digest
SHA256 45cf31d35ddcacc9fdaaa91012a60b2bbb549e828aa223e749fd4941ac3502bf
MD5 69dafc3b42152dcf612666e8bbd990fd
BLAKE2b-256 d226cbe7790c3ab289c9acde4c988293a58f03a4ed8748f402ef53b04edfa77f

See more details on using hashes here.

File details

Details for the file tradingview_indicators-0.0.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tradingview_indicators-0.0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad7aadc92843c33cbdbd847f86ffd1ecec9a34c5699a711a4861ac041d2f3b43
MD5 0416669fdc0fb7057d0823f8c9b6307e
BLAKE2b-256 63f6a6390a6e2faa61e1ded124d17ce880f5132608267e0083779e55e4d42893

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page