Documentation ¶
Index ¶
- func Average(arr []float64) float64
- func CalculatePivot(values Slice, left, right int, f func(a, pivot float64) bool) (float64, bool)
- func CrossOver(series1 []float64, series2 []float64) bool
- func CrossUnder(series1 []float64, series2 []float64) bool
- func Group(arr []float64, minDistance float64) []float64
- func Higher(arr []float64, x float64) []float64
- func Lower(arr []float64, x float64) []float64
- func MinMax(inReal []float64, inTimePeriod int) (outMin []float64, outMax []float64)
- func Multiply(inReal0 []float64, inReal1 []float64) []float64
- type Map
- type Slice
- func (s Slice) Abs() (values Slice)
- func (s Slice) Addr() *Slice
- func (s Slice) Diff() (values Slice)
- func (s Slice) DivScalar(x float64) (values Slice)
- func (s Slice) Dot(other Slice) float64
- func (s *Slice) Index(i int) float64
- func (s *Slice) Last() float64
- func (s *Slice) Length() int
- func (s Slice) Max() float64
- func (s Slice) Mean() (mean float64)
- func (s Slice) Min() float64
- func (s Slice) Mul(other Slice) (values Slice)
- func (s Slice) MulScalar(x float64) (values Slice)
- func (s Slice) NegativeValuesOrZero() (values Slice)
- func (s Slice) Normalize() Slice
- func (s Slice) Pivot(left, right int, f func(a, pivot float64) bool) (float64, bool)
- func (s *Slice) Pop(i int64) (v float64)
- func (s Slice) PositiveValuesOrZero() (values Slice)
- func (s *Slice) Push(v float64)
- func (s Slice) Sum() (sum float64)
- func (s Slice) Tail(size int) Slice
- func (s *Slice) Update(v float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculatePivot ¶ added in v1.41.0
func CrossOver ¶
CrossOver returns true if series1 is crossing over series2.
NOTE: Usually this is used with Media Average Series to check if it crosses for buy signals. It assumes first values are the most recent. The crossover function does not use most recent value, since usually it's not a complete candle. The second recent values and the previous are used, instead.
ported from https://github.com/markcheno/go-talib/blob/master/talib.go
func CrossUnder ¶
CrossUnder returns true if series1 is crossing under series2.
NOTE: Usually this is used with Media Average Series to check if it crosses for sell signals.
ported from https://github.com/markcheno/go-talib/blob/master/talib.go
func MinMax ¶
MinMax - Lowest and highest values over a specified period ported from https://github.com/markcheno/go-talib/blob/master/talib.go
Types ¶
type Slice ¶
type Slice []float64
func (Slice) NegativeValuesOrZero ¶
func (Slice) PositiveValuesOrZero ¶
Click to show internal directories.
Click to hide internal directories.