talib

package
v0.0.0-...-4058e4e Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RangeBoundRecommend = &RangeBound{
		RSI: &Bound{30, 70},
		K:   &Bound{20, 80},
		D:   &Bound{20, 80},
	}

	RangeBoundReadyTrade = &RangeBound{
		RSI: &Bound{20, 80},
		K:   &Bound{15, 85},
		D:   &Bound{15, 85},
	}
)

Functions

func EveningStar

func EveningStar()

func KDJ

func KDJ(rPeriod, kPeriod, dPeriod int, high, low, closing []float64) ([]float64, []float64, []float64)

func Max

func Max(period int, values []float64) []float64

Moving max for the given period.

func Min

func Min(period int, values []float64) []float64

Moving min for the given period.

func RSIPeriod

func RSIPeriod(period int, closing []float64) ([]float64, []float64)

RSIPeriod allows to calculate the RSI indicator with a non-standard period.

func ResolvePositionSide

func ResolvePositionSide(stoch *models.Stoch, bound *RangeBound) (futures.PositionSideType, error)

func Rma

func Rma(period int, values []float64) []float64

Rolling Moving Average (RMA).

R[0] to R[p-1] is SMA(values) R[p] and after is R[i] = ((R[i-1]*(p-1)) + v[i]) / p

Returns r.

func SetUp

func SetUp()

func WithinRangeBound

func WithinRangeBound(stoch *models.Stoch, bound *RangeBound) bool

Types

type Bound

type Bound struct {
	Lower float64
	Upper float64
}

type RangeBound

type RangeBound struct {
	RSI *Bound
	K   *Bound
	D   *Bound
}

Jump to

Keyboard shortcuts

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