factorzoo

package
v0.0.0-...-8d88297 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateKLinesPMR

func CalculateKLinesPMR(allKLines []types.KLine, window int) float64

func CalculateKLinesPVD

func CalculateKLinesPVD(allKLines []types.KLine, window int) float64

Types

type KLineValueMapper

type KLineValueMapper func(k types.KLine) float64

type MOM

type MOM struct {
	types.SeriesBase
	types.IntervalWindow

	// Values
	Values    floats.Slice
	LastValue float64

	EndTime time.Time

	UpdateCallbacks []func(val float64)
	// contains filtered or unexported fields
}

func (*MOM) Bind

func (inc *MOM) Bind(updater indicator.KLineWindowUpdater)

func (*MOM) CalculateAndUpdate

func (inc *MOM) CalculateAndUpdate(allKLines []types.KLine)

func (*MOM) EmitUpdate

func (inc *MOM) EmitUpdate(val float64)

func (*MOM) Index

func (inc *MOM) Index(i int) float64

func (*MOM) Last

func (inc *MOM) Last() float64

func (*MOM) Length

func (inc *MOM) Length() int

func (*MOM) OnUpdate

func (inc *MOM) OnUpdate(cb func(val float64))

func (*MOM) PushK

func (inc *MOM) PushK(k types.KLine)

func (*MOM) Update

func (inc *MOM) Update(open, close float64)

type PMR

type PMR struct {
	types.IntervalWindow
	types.SeriesBase

	Values  floats.Slice
	SMA     *indicator.SMA
	EndTime time.Time
	// contains filtered or unexported fields
}

func (*PMR) Bind

func (inc *PMR) Bind(updater indicator.KLineWindowUpdater)

func (*PMR) CalculateAndUpdate

func (inc *PMR) CalculateAndUpdate(allKLines []types.KLine)

func (*PMR) EmitUpdate

func (inc *PMR) EmitUpdate(value float64)

func (*PMR) Index

func (inc *PMR) Index(i int) float64

func (*PMR) Last

func (inc *PMR) Last() float64

func (*PMR) Length

func (inc *PMR) Length() int

func (*PMR) OnUpdate

func (inc *PMR) OnUpdate(cb func(value float64))

func (*PMR) PushK

func (inc *PMR) PushK(k types.KLine)

func (*PMR) Update

func (inc *PMR) Update(price float64)

type PVD

type PVD struct {
	types.IntervalWindow
	types.SeriesBase

	Values  floats.Slice
	Prices  *types.Queue
	Volumes *types.Queue
	EndTime time.Time
	// contains filtered or unexported fields
}

func (*PVD) Bind

func (inc *PVD) Bind(updater indicator.KLineWindowUpdater)

func (*PVD) CalculateAndUpdate

func (inc *PVD) CalculateAndUpdate(allKLines []types.KLine)

func (*PVD) EmitUpdate

func (inc *PVD) EmitUpdate(value float64)

func (*PVD) Index

func (inc *PVD) Index(i int) float64

func (*PVD) Last

func (inc *PVD) Last() float64

func (*PVD) Length

func (inc *PVD) Length() int

func (*PVD) OnUpdate

func (inc *PVD) OnUpdate(cb func(value float64))

func (*PVD) PushK

func (inc *PVD) PushK(k types.KLine)

func (*PVD) Update

func (inc *PVD) Update(price float64, volume float64)

type RR

type RR struct {
	types.IntervalWindow
	types.SeriesBase

	Values  floats.Slice
	EndTime time.Time
	// contains filtered or unexported fields
}

func (*RR) Bind

func (inc *RR) Bind(updater indicator.KLineWindowUpdater)

func (*RR) BindK

func (inc *RR) BindK(target indicator.KLineClosedEmitter, symbol string, interval types.Interval)

func (*RR) CalculateAndUpdate

func (inc *RR) CalculateAndUpdate(allKLines []types.KLine)

func (*RR) EmitUpdate

func (inc *RR) EmitUpdate(value float64)

func (*RR) Index

func (inc *RR) Index(i int) float64

func (*RR) Last

func (inc *RR) Last() float64

func (*RR) Length

func (inc *RR) Length() int

func (*RR) LoadK

func (inc *RR) LoadK(allKLines []types.KLine)

func (*RR) OnUpdate

func (inc *RR) OnUpdate(cb func(value float64))

func (*RR) PushK

func (inc *RR) PushK(k types.KLine)

func (*RR) Update

func (inc *RR) Update(price float64)

type VMOM

type VMOM struct {
	types.SeriesBase
	types.IntervalWindow

	// Values
	Values    floats.Slice
	LastValue float64

	EndTime time.Time

	UpdateCallbacks []func(val float64)
	// contains filtered or unexported fields
}

func (*VMOM) Bind

func (inc *VMOM) Bind(updater indicator.KLineWindowUpdater)

func (*VMOM) CalculateAndUpdate

func (inc *VMOM) CalculateAndUpdate(allKLines []types.KLine)

func (*VMOM) EmitUpdate

func (inc *VMOM) EmitUpdate(val float64)

func (*VMOM) Index

func (inc *VMOM) Index(i int) float64

func (*VMOM) Last

func (inc *VMOM) Last() float64

func (*VMOM) Length

func (inc *VMOM) Length() int

func (*VMOM) OnUpdate

func (inc *VMOM) OnUpdate(cb func(val float64))

func (*VMOM) PushK

func (inc *VMOM) PushK(k types.KLine)

func (*VMOM) Update

func (inc *VMOM) Update(volume float64)

Jump to

Keyboard shortcuts

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