core

package
v0.0.0-...-1a031c1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcAverageTrade

func CalcAverageTrade(profits []float64, filter []int8) float64

func CalcDrawDown

func CalcDrawDown(equity *[]float64, drawDown *[]float64) float64

func CalcWinningPercentage

func CalcWinningPercentage(profits []float64, filter []int8) float64

Types

type Date

type Date int

func (Date) IsNil

func (ed Date) IsNil() bool

func (Date) String

func (ed Date) String() string

type Plot

type Plot struct {
	Days   []int     `json:"days"`
	Values []float64 `json:"values"`
}

func (*Plot) AddPoint

func (p *Plot) AddPoint(day int, value float64)

type SortedResults

type SortedResults struct {
	Size    int
	MaxSize int
	Tree    *avl.Tree
}

func NewSortedResults

func NewSortedResults(maxSize int, comparator utils.Comparator) *SortedResults

func (*SortedResults) Add

func (sr *SortedResults) Add(item any)

func (*SortedResults) ToList

func (sr *SortedResults) ToList() []any

type WorkerPool

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

func (*WorkerPool) Init

func (p *WorkerPool) Init(numWorkers, queueSize int)

func (*WorkerPool) ShutDown

func (p *WorkerPool) ShutDown() bool

func (*WorkerPool) Submit

func (p *WorkerPool) Submit(task func())

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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