tatk

Crates.iotatk
lib.rstatk
version0.3.0
sourcesrc
created_at2023-08-29 21:38:23.428675
updated_at2023-10-31 02:04:49.670624
descriptionTechnical Analysis Toolkit
homepagehttps://github.com/Ohkthx/tatk-rs
repositoryhttps://github.com/Ohkthx/tatk-rs
max_upload_size
id958484
size145,615
(Ohkthx)

documentation

README

Donate with Bitcoin! Donate with Ethereum! Donate with BNB!
crates.io version crates.io downloads

TATK, Technical Analysis Toolkit

The objective of this crate is analyzing signals and indicators of data and providing additional tools for accurate analysis. There are several other wonderful crates that implement similar algorithms, however they did not meet my personal needs or had minor errors in their calculations.

[dependencies]
tatk = { git = "https://github.com/ohkthx/tatk-rs" }

Features

Documentation

Most of the documentation can be accessed by clicking the following link: docs.rs. That documentation is automatically generated and also accessible from crates.io.

Traits

The following traits are either used by the crate on indicators or to be defined by the user for additional functionality.

  • Indicator
    • Stats - Basic statistics for the indicator such as: sum, mean, variance, and standard deviation.
    • Period - Period of window of the data for the indicator.
    • Next - Add a new data point to the indicator to recalculate value.
  • User Defined
    • AsValue - Alternative value that can be passed to an Indicators Next.
    • Open - Opening value for the data type.
    • Close - Closing value for the data type.
    • Low - Lowest value for the data type.
    • High - Highest value for the data type.
    • Volume - Total volume for the data type.
  • Others
    • Hl2 - Average of the Highest and Lowest values, requires High and Low to be defined.
    • Hlc3 - Average of the Highest, Lowest, and Close values, requires High, Low, and Close to be defined.
    • Ohlc4 - Average of the Open, Highest, Lowest, and Close values, requires Open, High, Low, and Close to be defined.

Examples

Following examples can be ran with: cargo run --example short_id

  • Simple Moving Average (SMA): sma.rs
  • Exponential Moving Average (EMA): ema.rs
  • Double Exponential Moving Average (DEMA): dema.rs
  • Moving Average Convergence Divergence (MACD): macd.rs
  • Relative Strength Indicator (RSI): rsi.rs
  • Bollinger Bands (BBands): bbands.rs
  • Average True Range (ATR): atr.rs
  • McGinley Dynamic Indicator (MD): md.rs
  • On-Balance Volume (OBV): obv.rs
  • Rate of Change (ROC): roc.rs
  • Linear Regression (LineReg): linereg.rs
  • Traits (Traits): user_traits.rs

Tips Appreciated!

Wallet addresses are provided below, or click the badges above!

Ethereum (ETH): 0x7d75f6a9c021fcc70691fec73368198823fb0f60
Bitcoin (BTC):  bc1q75w3cgutug8qdxw3jlmqnkjlv9alt3jr7ftha0
Binance (BNB):  0x7d75f6a9c021fcc70691fec73368198823fb0f60
Commit count: 22

cargo fmt