Skip to content

Comprehensive technical indicators library for Go - Moving Averages, Oscillators, Momentum, Volatility, and more

License

Notifications You must be signed in to change notification settings

shahid-2020/techind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trading Indicators Go

Go Version License

A comprehensive technical analysis library for financial markets written in Go.
Provides high-performance trading indicators for algorithmic trading, quantitative analysis, and financial applications.


Installation

go get github.com/shahid-2020/tradingindicators

Quick Start

package main

import (
    "fmt"
    "github.com/shahid-2020/techind/indicators"
)

func main() {
    // Sample price data
    prices := []float64{45.23, 46.50, 45.80, 47.20, 47.50, 48.10, 47.80, 49.20, 49.50, 48.80}

    // Calculate moving averages
    sma, _ := indicators.SMA(prices, 5)
    ema, _ := indicators.EMA(prices, 5)

    // Calculate MACD
    macd, signal, histogram, _ := indicators.MACD(prices, 12, 26, 9)

    fmt.Printf("SMA(5): %.2f\n", sma[len(sma)-1])
    fmt.Printf("EMA(5): %.2f\n", ema[len(ema)-1])
    fmt.Printf("MACD: %.4f, Signal: %.4f\n", macd[len(macd)-1], signal[len(signal)-1])
}

Available Indicators

Trend Indicators

  • SMA – Simple Moving Average
  • EMA – Exponential Moving Average
  • MACD – Moving Average Convergence Divergence

Momentum Indicators

  • RSI – Relative Strength Index (Wilder’s variant)
  • ROC – Rate of Change
  • CCI – Commodity Channel Index
  • Stochastic Oscillator (%K, %D)
  • Williams %R

Volatility Indicators

  • Bollinger Bands (Middle, Upper, Lower)
  • ATR – Average True Range

About

Comprehensive technical indicators library for Go - Moving Averages, Oscillators, Momentum, Volatility, and more

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published