indicator

package module
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: MIT Imports: 2 Imported by: 2 modules, 4 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 added in v0.6.0

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

func Impulse added in v0.5.0

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

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

func KC added in v0.4.2

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

func KCLB added in v0.4.2

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

Keltner Channel used by LazyBear

func KCTV added in v0.4.2

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 added in v0.2.0

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

func Multiply added in v0.2.0

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

func Rtm added in v0.3.0

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

func Squeeze added in v0.4.0

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 added in v0.4.5

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

SuperTrend with upper/lower bands

Types

type Detail added in v0.4.0

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 added in v0.4.0

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

func Summary added in v0.4.0

func Summary(d Detail) (r Result)

type Sniper added in v0.2.0

type Sniper struct {
	Length int
}

func (Sniper) Signal added in v0.2.0

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
⌂ 换网址