indicator

package
v0.0.0-...-51f06fb Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action int
const (
	ActBuy  Action = 1
	ActHold Action = 0
	ActSell Action = -1
)

func (Action) String

func (a Action) String() string

type DebugPlot

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

func NewDebugPlot

func NewDebugPlot(w, h float64) *DebugPlot

func (*DebugPlot) Add

func (d *DebugPlot) Add(p *plot.Plot, height float64)

func (*DebugPlot) Save

func (d *DebugPlot) Save(path string) (err error)

type EnsembleIndicator

type EnsembleIndicator struct {
	Children []WeightedIndicator
}

func (*EnsembleIndicator) DrawDebug

func (i *EnsembleIndicator) DrawDebug(d *DebugPlot) error

func (*EnsembleIndicator) GetSignal

func (i *EnsembleIndicator) GetSignal() (s Signal, err error)

type MACDIndicator

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

func NewMACD

func NewMACD(cfg config.MACD, bars barsProvider) *MACDIndicator

func (*MACDIndicator) DrawDebug

func (i *MACDIndicator) DrawDebug(d *DebugPlot) error

func (*MACDIndicator) GetSignal

func (i *MACDIndicator) GetSignal() (s Signal, err error)

type RSIIndictor

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

func NewRSI

func NewRSI(cfg config.RSI, bars barsProvider) *RSIIndictor

func (*RSIIndictor) DrawDebug

func (i *RSIIndictor) DrawDebug(d *DebugPlot) error

func (*RSIIndictor) GetSignal

func (i *RSIIndictor) GetSignal() (s Signal, err error)

type Signal

type Signal struct {
	Act        Action
	Confidence float64
}

type WeightedIndicator

type WeightedIndicator struct {
	Weight    float64
	Indicator tradingIndicator
}

Jump to

Keyboard shortcuts

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