trader

package
v0.0.0-...-d060b71 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2018 License: MIT Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Executor = make(map[int64]*Global) //保存正在运行的策略,防止重复运行

)

Trader Variable

Functions

func GetTraderStatus

func GetTraderStatus(id int64) (status int64)

GetTraderStatus ...

func Switch

func Switch(id int64) (err error)

Switch ...

Types

type Global

type Global struct {
	model.Trader
	Logger model.Logger //利用这个对象保存日志
	// contains filtered or unexported fields
}

Global ...

func (*Global) AddTask

func (g *Global) AddTask(group otto.Value, fn otto.Value, args ...interface{}) bool

AddTask ...

func (*Global) BindTaskParam

func (g *Global) BindTaskParam(group otto.Value, fn otto.Value, args ...interface{}) bool

BindTaskParam ...

func (*Global) Console

func (g *Global) Console(msgs ...interface{})

Console ...

func (*Global) ExecTasks

func (g *Global) ExecTasks(group otto.Value) (results []interface{})

ExecTasks ...

func (*Global) Log

func (g *Global) Log(msgs ...interface{})

Log ...

func (*Global) LogProfit

func (g *Global) LogProfit(msgs ...interface{})

LogProfit ...

func (*Global) Sleep

func (g *Global) Sleep(intervals ...interface{})

Sleep ...

type Tasks

type Tasks map[string][]task

Jump to

Keyboard shortcuts

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