waves

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Index   int
	Current float64
	High    float64
	Low     float64
}

type Kind

type Kind = int8

Kind 浪型

const (
	Unknown Kind = 0  // 位置状态
	Drive   Kind = 1  // 驱动浪
	Adjust  Kind = -1 // 调整浪
)

type Trend

type Trend struct {
	Peak    num.DataPoint // 波峰
	Valley  num.DataPoint // 波谷
	Periods int           // 周期数
	State   Kind          // 状态
	Inner   []Trend       // 嵌套浪
}

Trend 趋势

type Waves

type Waves struct {
	Trends     []Trend
	DataLength int
	State      Kind
	LastHigh   num.DataPoint
	LastLow    num.DataPoint
}

func (*Waves) Len

func (w *Waves) Len() int

func (*Waves) Push

func (w *Waves) Push(data Data)

Jump to

Keyboard shortcuts

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