tools

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderCondition

type OrderCondition struct {
	Condition func(df *ninjabot.Dataframe) bool
	Size      float64
	Side      ninjabot.SideType
}

type Scheduler

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

func NewScheduler

func NewScheduler(pair string) *Scheduler

func (*Scheduler) BuyWhen

func (s *Scheduler) BuyWhen(size float64, condition func(df *ninjabot.Dataframe) bool)

func (*Scheduler) SellWhen

func (s *Scheduler) SellWhen(size float64, condition func(df *ninjabot.Dataframe) bool)

func (*Scheduler) Update

func (s *Scheduler) Update(df *ninjabot.Dataframe, broker service.Broker)

type TrailingStop

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

func NewTrailingStop

func NewTrailingStop() *TrailingStop

func (TrailingStop) Active

func (t TrailingStop) Active() bool

func (*TrailingStop) Start

func (t *TrailingStop) Start(current, stop float64)

func (*TrailingStop) Stop

func (t *TrailingStop) Stop()

func (*TrailingStop) Update

func (t *TrailingStop) Update(current float64) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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