indicator

package module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-indicators

Technical analysis indicator

Documentation

Index

Constants

View Source
const (
	Black int = 1
	Gray      = -1
	Blue      = 0
)

Variables

This section is empty.

Functions

func Efi

func Efi(inTimePeriod int, inReal, inVol []float64) []float64

func Impulse

func Impulse(ema, macdHist []float64) []int

1: green, -1: red, 0: blue

func KC

func KC(inHigh, inLow, inClose []float64, inTimePeriod int, multiplier float64, basisMAType, rangeMAType talib.MaType) (upper, basis, lower []float64)

func KCLB

func KCLB(inHigh, inLow, inClose []float64, inTimePeriod int, multiplier float64) (upper, basis, lower []float64)

Keltner Channel used by LazyBear

func KCTV

func KCTV(inHigh, inLow, inClose []float64, inTimePeriod int, multiplier float64) (upper, basis, lower []float64)

Keltner Channel used by TradingView, use EMA as default

func Keltner

func Keltner(factor float64, mean, atr []float64) (upper, lower []float64)

func Multiply

func Multiply(source []float64, multiplier float64) []float64

func Rtm

func Rtm(atrPeriod, emaPeriod int, factor float64, inHigh, inLow, inClose []float64) (mean, upper, lower, atr []float64)

func Squeeze

func Squeeze(bbl, kcl int, bbf, kcf float64, inHigh, inLow, inClose []float64) (r Result, d Detail)

Squeeze Momentum Indicator [LazyBear] https://cn.tradingview.com/script/nqQ1DT5a-Squeeze-Momentum-Indicator-LazyBear/ bbl: BB Length kcl: KC Length bbf: BB MultFactor kcf: KC MulFactor

func SuperTrend

func SuperTrend(factor float64, period int, inHigh, inLow, inClose []float64) ([]float64, []bool)

SuperTrend V1.0 - Buy or Sell Signal https://cn.tradingview.com/chart/5wBFaZWw/ trend true = green, false = red red->green = false->true = buy green->red = true->false = sell

func SuperTrendDetail

func SuperTrendDetail(factor float64, period int, inHigh, inLow, inClose []float64) ([]float64, []float64, []float64, []bool)

SuperTrendDetail SuperTrend with upper/lower bands

Types

type Detail

type Detail struct {
	Value      []float64
	SqueezeOn  []bool
	SqueezeOff []bool
	NoSqueeze  []bool
	KCUpper    []float64
	KCMiddle   []float64
	KCLower    []float64
	BBUpper    []float64
	BBMiddle   []float64
	BBLower    []float64
}

type Result

type Result struct {
	Trend int // 1 squeeze, 2 up, -2 down, 0 stop
	Last  int
}

func Summary

func Summary(d Detail) (r Result)

type Sniper

type Sniper struct {
	Length int
}

func (Sniper) Signal

func (s Sniper) Signal(inHigh, inLow, inClose []float64) []int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址