settings

package
v0.0.0-...-95b083d Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Unlicense Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TradingStrategyInvalid = iota
	TradingStrategyInstantNoodles
	TradingStrategyDollarCostAveraging // recommended within 1h interval
)

Variables

View Source
var (
	DefaultSettings = NewDefaultSettings()
)

Functions

This section is empty.

Types

type PNL

type PNL struct {
	GainPricePercent float64 `json:"gain_price,omitempty"`
	LossPricePercent float64 `json:"loss_price,omitempty"`
	DesiredProfit    float64 `json:"disired_profit,omitempty"`
	DesiredLoss      float64 `json:"disired_loss,omitempty"`
}

type Settings

type Settings struct {
	SignalDisabled         bool            `json:"signal_disabled,omitempty"`
	TradingEnabled         bool            `json:"trading_enabled,omitempty"`
	TradingCost            float64         `json:"trading_cost,omitempty"`
	TradingInterval        string          `json:"trading_interval,omitempty"`
	TradingStrategy        TradingStrategy `json:"trading_strategy,omitempty"`
	MaxPositionsDaily      int32           `json:"max_positions_daily,omitempty"`
	MaxPositionsPerTime    int32           `json:"max_positions_per_time,omitempty"`
	PreferLeverageBrackets []int           `json:"prefer_leverage_brackets,omitempty"`
	LongPNL                *PNL            `json:"long_pnl,omitempty"`
	ShortPNL               *PNL            `json:"short_pnl,omitempty"`
}

func NewDefaultSettings

func NewDefaultSettings() *Settings

func (*Settings) GetPreferLeverage

func (s *Settings) GetPreferLeverage(leverageBrackets []*binance.LeverageBracket) int

type TradingStrategy

type TradingStrategy byte

Jump to

Keyboard shortcuts

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