runner

package
v0.0.0-...-e5e8b79 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackfillRunner

type BackfillRunner struct {
	ConfigFile string
	Days       int64
	Debug      bool
	// contains filtered or unexported fields
}

func (*BackfillRunner) Run

func (runner *BackfillRunner) Run(cli *cli.Context) error

type BalanceRunner

type BalanceRunner struct {
	ConfigFile        string
	CalculateCurrency bool
}

func (*BalanceRunner) Run

func (runner *BalanceRunner) Run(cli *cli.Context) error

type ListSelectorRunner

type ListSelectorRunner struct{}

func (*ListSelectorRunner) Run

func (runner *ListSelectorRunner) Run(cli *cli.Context) error

type ListStrategiesRunner

type ListStrategiesRunner struct{}

func (*ListStrategiesRunner) Run

func (runner *ListStrategiesRunner) Run(cli *cli.Context) error

type SimRunner

type SimRunner struct {
	ConfigFile          string
	Strategy            string
	OrderType           string
	Filename            string
	Days                int64
	CurrencyCapital     int64
	AssetCapital        int64
	AvgSlippagePct      float64
	BuyPct              int64
	SellPct             int64
	MarkdownBuyPct      int64
	MarkupSellPct       int64
	OrderAdjustTime     int64
	OrderPollTime       int64
	SellCancelPct       float64
	SellStopPct         float64
	BuyStopPct          float64
	ProfitStopEnablePct int64
	ProfitStopPct       int64
	MaxSellLossPct      int64
	MaxBuyLossPct       int64
	MaxSlippagePct      int64

	RSIPeriods           int64
	ExactBuyOrders       bool
	ExactSellOrders      bool
	DisableOptions       bool
	QuarentineTime       int64
	EnableStats          bool
	BacktesterGeneration int64
	Verbose              bool
	Silent               bool
	// contains filtered or unexported fields
}

SimRunner implements the trading simulation logic for the 'sim' CLI command.

func (*SimRunner) Run

func (runner *SimRunner) Run(cli *cli.Context) error

type TradeRunner

type TradeRunner struct {
	ConfigFile          string
	Strategy            string
	OrderType           string
	Filename            string
	Days                int64
	CurrencyCapital     int64
	AssetCapital        int64
	AvgSlippagePct      float64
	BuyPct              int64
	SellPct             int64
	MarkdownBuyPct      int64
	MarkupSellPct       int64
	OrderAdjustTime     int64
	OrderPollTime       int64
	SellCancelPct       float64
	SellStopPct         float64
	BuyStopPct          float64
	ProfitStopEnablePct int64
	ProfitStopPct       int64
	MaxSellLossPct      int64
	MaxBuyLossPct       int64
	MaxSlippagePct      int64

	RSIPeriods           int64
	ExactBuyOrders       bool
	ExactSellOrders      bool
	DisableOptions       bool
	QuarentineTime       int64
	EnableStats          bool
	BacktesterGeneration int64
	Verbose              bool
	Silent               bool
	PaperTrade           bool
	// contains filtered or unexported fields
}

TradeRunner holds the necessary data an implementation for the 'trade' CLI command. This runner is able to connect to a Cassandra cluster (with the user-provided configuration) and fetch/insert trading data.

func (*TradeRunner) Run

func (runner *TradeRunner) Run(cli *cli.Context) error

Jump to

Keyboard shortcuts

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