logic

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FormulaStatus

type FormulaStatus struct {
	Txt string
	B   []byte
	Err error
}

type Logic

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

func NewLogic

func NewLogic(b trade.IExchange, ft *trigger.FormulaTrigger, isTest bool) *Logic

func (*Logic) Alter added in v0.1.0

func (l *Logic) Alter(s string) error

func (*Logic) Begin

func (l *Logic) Begin(s Sender, str string) error

func (*Logic) Buy

func (l *Logic) Buy(s Sender) error

func (*Logic) Draw

func (l *Logic) Draw(str string, f formula.Formula) ([]byte, error)

func (*Logic) End

func (l *Logic) End(s Sender) error

func (*Logic) Fstat

func (l *Logic) Fstat(str string) *FormulaStatus

Если trigger активен, то показывает формулу из него Если trigger не активен, то парсит из строки (если строки нет, то пытается взять то что осталось в триггере)

func (*Logic) SafeTestModeSwitch added in v0.1.0

func (l *Logic) SafeTestModeSwitch() bool

func (*Logic) Sell

func (l *Logic) Sell(s Sender) error

func (*Logic) SetScale added in v0.1.0

func (l *Logic) SetScale(scale string)

type Sender

type Sender interface {
	Send(text string)
	SendPhoto(name string, b []byte)
}

Jump to

Keyboard shortcuts

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