indicator icon indicating copy to clipboard operation
indicator copied to clipboard

Indicator is a Golang module providing various stock technical analysis indicators for trading.

GoDoc License Build Status Go Report Card codecov CodeQL Analysis

Indicator Go

Indicator is a Golang module providing various stock technical analysis indicators, strategies, and a backtest framework for trading.

I also have a TypeScript version of this module now at Indicator TS.

Indicators Provided

The following list of indicators are currently supported by this package:

Trend Indicators

  • Absolute Price Oscillator (APO)
  • Aroon Indicator
  • Balance of Power (BOP)
  • Chande Forecast Oscillator (CFO)
  • Community Channel Index (CMI)
  • Double Exponential Moving Average (DEMA)
  • Exponential Moving Average (EMA)
  • Mass Index (MI)
  • Moving Average Convergence Divergence (MACD)
  • Moving Max
  • Moving Min
  • Moving Sum
  • Parabolic SAR
  • Qstick
  • Random Index (KDJ)
  • Rolling Moving Average (RMA)
  • Simple Moving Average (SMA)
  • Since Change
  • Triple Exponential Moving Average (TEMA)
  • Triangular Moving Average (TRIMA)
  • Triple Exponential Average (TRIX)
  • Typical Price
  • Volume Weighted Moving Average (VWMA)
  • Vortex Indicator

Momentum Indicators

  • Awesome Oscillator
  • Chaikin Oscillator
  • Ichimoku Cloud
  • Percentage Price Oscillator (PPO)
  • Percentage Volume Oscillator (PVO)
  • Relative Strength Index (RSI)
  • RSI 2
  • RSI Period
  • Stochastic Oscillator
  • Williams R

Volatility Indicators

  • Acceleration Bands
  • Actual True Range (ATR)
  • Bollinger Band Width
  • Bollinger Bands
  • Chandelier Exit
  • Donchian Channel (DC)
  • Keltner Channel (KC)
  • Moving Standard Deviation (Std)
  • Projection Oscillator (PO)
  • Ulcer Index (UI)

Volume Indicators

  • Accumulation/Distribution (A/D)
  • Chaikin Money Flow (CMF)
  • Ease of Movement (EMV)
  • Force Index (FI)
  • Money Flow Index (MFI)
  • Negative Volume Index (NVI)
  • On-Balance Volume (OBV)
  • Volume Price Trend (VPT)
  • Volume Weighted Average Price (VWAP)

Strategies Provided

Strategies relies on the following:

  • Asset
  • Action
  • Strategy Function
  • Buy and Hold Strategy

The following list of strategies are currently supported by this package:

Trend Strategies

  • Chande Forecast Oscillator Strategy
  • KDJ Strategy
  • MACD Strategy
  • Trend Strategy
  • Volume Weighted Moving Average (VWMA) Strategy

Momentum Strategies

  • Awesome Oscillator Strategy
  • RSI Strategy
  • RSI 2 Strategy
  • Williams R Strategy

Volatility Strategies

  • Bollinger Bands Strategy
  • Projection Oscillator Strategy

Volume Strategies

  • Chaikin Money Flow Strategy
  • Ease of Movement Strategy
  • Force Index Strategy
  • Money Flow Index Strategy
  • Negative Volume Index Strategy
  • Volume Weighted Average Price Strategy

Compound Strategies

  • All Strategies
  • Run Strategies
  • Separate Strategies
  • MACD and RSI Strategy

Backtest

Backtesting is the method for seeing how well a strategy would have done. The following backtesting functions are provided for evaluating strategies.

  • Apply Actions
  • Count Transactions
  • Normalize Actions
  • Normalize Gains

Usage

Install package.

go get github.com/cinar/indicator

Import indicator.

import (
    "github.com/cinar/indicator"
)

Disclaimer

The information provided on this project is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.

License

Copyright (c) 2021 Onur Cinar. All Rights Reserved.

The source code is provided under MIT License.