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.
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 ¶
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 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.