filters

package
v1.1.1-rc-12 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	// contains filtered or unexported methods
}

Filter interface defines a filter's methods processing trades from the tradesBlockService.

type FilterMA

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

FilterMA is the struct for a moving average filter implementing the Filter interface.

func NewFilterMA

func NewFilterMA(asset dia.Asset, exchange string, currentTime time.Time, param int) *FilterMA

NewFilterMA returns a moving average filter. @currentTime is the begin time of the filtersBlock.

type FilterMAIR

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

FilterMAIR implements a trimmed moving average. Outliers are eliminated using interquartile range. see: https://en.wikipedia.org/wiki/Interquartile_range

func NewFilterMAIR

func NewFilterMAIR(asset dia.Asset, exchange string, currentTime time.Time, memory int) *FilterMAIR

NewFilterMAIR returns a FilterMAIR

type FilterMEDIR

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

FilterMEDIR contains the configuration parameters of the filter. It implements a trimmed median. Outliers are eliminated using interquartile range see: https://en.wikipedia.org/wiki/Interquartile_range

func NewFilterMEDIR

func NewFilterMEDIR(asset dia.Asset, exchange string, currentTime time.Time, memory int) *FilterMEDIR

NewFilterMEDIR creates a FilterMEDIR

type FilterTLT

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

func NewFilterTLT

func NewFilterTLT(asset dia.Asset, exchange string) *FilterTLT

type FilterVOL

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

func NewFilterVOL

func NewFilterVOL(asset dia.Asset, exchange string, memory int) *FilterVOL

type FiltersBlockService

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

FiltersBlockService is the data structure containing all objects necessary for the processing of a tradesBlock.

func NewFiltersBlockService

func NewFiltersBlockService(previousBlockFilters []dia.FilterPoint, datastore models.Datastore, chanFiltersBlock chan *dia.FiltersBlock) *FiltersBlockService

NewFiltersBlockService returns a new FiltersBlockService and runs mainLoop() in a go routine.

func (*FiltersBlockService) Close

func (s *FiltersBlockService) Close() error

Close gracefully closes the Filtersblockservice

func (*FiltersBlockService) ProcessTradesBlock

func (s *FiltersBlockService) ProcessTradesBlock(tradesBlock *dia.TradesBlock)

ProcessTradesBlock sends a filled tradesBlock into the filtersBlock channel.

Jump to

Keyboard shortcuts

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