Documentation
¶
Index ¶
Constants ¶
View Source
const ID = "rebalance"
Variables ¶
This section is empty.
Functions ¶
func ElementwiseProduct ¶
func ElementwiseProduct(m1, m2 map[string]fixedpoint.Value) map[string]fixedpoint.Value
func Normalize ¶
func Normalize(m map[string]fixedpoint.Value) map[string]fixedpoint.Value
func Sum ¶
func Sum(m map[string]fixedpoint.Value) fixedpoint.Value
Types ¶
type Strategy ¶
type Strategy struct {
Notifiability *bbgo.Notifiability
Interval types.Duration `json:"interval"`
BaseCurrency string `json:"baseCurrency"`
TargetWeights map[string]fixedpoint.Value `json:"targetWeights"`
Threshold fixedpoint.Value `json:"threshold"`
IgnoreLocked bool `json:"ignoreLocked"`
Verbose bool `json:"verbose"`
// max amount to buy or sell per order
MaxAmount fixedpoint.Value `json:"maxAmount"`
}
func (*Strategy) Run ¶
func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, session *bbgo.ExchangeSession) error
func (*Strategy) Subscribe ¶
func (s *Strategy) Subscribe(session *bbgo.ExchangeSession)
Click to show internal directories.
Click to hide internal directories.