kama

package
v0.0.0-...-85ff41b Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: GPL-3.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 KAMA

type KAMA struct {
	// contains filtered or unexported fields
}

KAMA - Kaufman's Adaptive Moving Average (http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:kaufman_s_adaptive_moving_average)

func NewKAMA

func NewKAMA(inTimePeriod int) *KAMA

NewKAMA constructs a new KAMA.

func (*KAMA) Add

func (kama *KAMA) Add(v float64) float64

Add adds a new sample value to the algorithm and returns the computed value.

func (*KAMA) WarmCount

func (kama *KAMA) WarmCount() int

WarmCount returns the number of samples that must be provided for the algorithm to be fully "warmed".

func (*KAMA) Warmed

func (kama *KAMA) Warmed() bool

Warmed indicates whether the algorithm has enough data to generate accurate results.

type KER

type KER struct {
	// contains filtered or unexported fields
}

KER - Kaufman's Efficiency Ratio (http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:kaufman_s_adaptive_moving_average#efficiency_ratio_er)

func NewKER

func NewKER(inTimePeriod int) *KER

NewKER constructs a new KER.

func (*KER) Add

func (ker *KER) Add(v float64) float64

Add adds a new sample value to the algorithm and returns the computed value.

func (*KER) WarmCount

func (ker *KER) WarmCount() int

WarmCount returns the number of samples that must be provided for the algorithm to be fully "warmed".

func (*KER) Warmed

func (ker *KER) Warmed() bool

Warmed indicates whether the algorithm has enough data to generate accurate results.

Jump to

Keyboard shortcuts

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