Documentation ¶
Index ¶
- Constants
- func KLineAmplitudeMapper(k types.KLine) float64
- func KLineHighPriceMapper(k types.KLine) float64
- func KLineLowPriceMapper(k types.KLine) float64
- type A18
- type A2
- type A3
- type A34
- type IntervalWindowSetting
- type KLineValueMapper
- type R
- type S0
- type S1
- type S2
- type S3
- type S4
- type S5
- type S6
- type S7
- type Strategy
- func (s *Strategy) ClosePosition(ctx context.Context, percentage fixedpoint.Value) error
- func (s *Strategy) ID() string
- func (s *Strategy) InstanceID() string
- func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, ...) error
- func (s *Strategy) Subscribe(session *bbgo.ExchangeSession)
Constants ¶
View Source
const ID = "fmaker"
Variables ¶
This section is empty.
Functions ¶
func KLineAmplitudeMapper ¶
func KLineHighPriceMapper ¶
func KLineLowPriceMapper ¶
Types ¶
type A18 ¶
type A18 struct { types.IntervalWindow // Values Values floats.Slice EndTime time.Time UpdateCallbacks []func(val float64) }
func (*A18) Bind ¶
func (inc *A18) Bind(updater indicator.KLineWindowUpdater)
func (*A18) CalculateAndUpdate ¶ added in v1.37.0
func (*A18) EmitUpdate ¶
type A2 ¶
type A2 struct { types.IntervalWindow // Values Values floats.Slice EndTime time.Time UpdateCallbacks []func(val float64) }
func (*A2) Bind ¶
func (inc *A2) Bind(updater indicator.KLineWindowUpdater)
func (*A2) CalculateAndUpdate ¶ added in v1.37.0
func (*A2) EmitUpdate ¶
type A3 ¶
type A3 struct { types.IntervalWindow // Values Values floats.Slice EndTime time.Time UpdateCallbacks []func(val float64) }
func (*A3) Bind ¶
func (inc *A3) Bind(updater indicator.KLineWindowUpdater)
func (*A3) CalculateAndUpdate ¶ added in v1.37.0
func (*A3) EmitUpdate ¶
type A34 ¶
type A34 struct { types.IntervalWindow // Values Values floats.Slice EndTime time.Time UpdateCallbacks []func(val float64) }
func (*A34) Bind ¶
func (inc *A34) Bind(updater indicator.KLineWindowUpdater)
func (*A34) CalculateAndUpdate ¶ added in v1.37.0
func (*A34) EmitUpdate ¶
type IntervalWindowSetting ¶
type IntervalWindowSetting struct {
types.IntervalWindow
}
type KLineValueMapper ¶
type R ¶
type R struct { types.IntervalWindow // Values Values floats.Slice EndTime time.Time UpdateCallbacks []func(val float64) }
func (*R) Bind ¶
func (inc *R) Bind(updater indicator.KLineWindowUpdater)
func (*R) CalculateAndUpdate ¶ added in v1.37.0
func (*R) EmitUpdate ¶
type S0 ¶
type S0 struct { types.IntervalWindow // Values Values floats.Slice EndTime time.Time UpdateCallbacks []func(val float64) }
func (*S0) Bind ¶
func (inc *S0) Bind(updater indicator.KLineWindowUpdater)
func (*S0) CalculateAndUpdate ¶ added in v1.37.0
func (*S0) EmitUpdate ¶
type S1 ¶
type S1 struct { types.IntervalWindow Values floats.Slice EndTime time.Time UpdateCallbacks []func(value float64) }
func (*S1) Bind ¶
func (inc *S1) Bind(updater indicator.KLineWindowUpdater)
func (*S1) CalculateAndUpdate ¶ added in v1.37.0
func (*S1) EmitUpdate ¶
type S2 ¶
type S2 struct { types.IntervalWindow Values floats.Slice EndTime time.Time UpdateCallbacks []func(value float64) }
func (*S2) Bind ¶
func (inc *S2) Bind(updater indicator.KLineWindowUpdater)
func (*S2) CalculateAndUpdate ¶ added in v1.37.0
func (*S2) EmitUpdate ¶
type S3 ¶
type S3 struct { types.IntervalWindow // Values Values floats.Slice EndTime time.Time UpdateCallbacks []func(val float64) }
func (*S3) Bind ¶
func (inc *S3) Bind(updater indicator.KLineWindowUpdater)
func (*S3) CalculateAndUpdate ¶ added in v1.37.0
func (*S3) EmitUpdate ¶
type S4 ¶
type S4 struct { types.IntervalWindow // Values Values floats.Slice EndTime time.Time UpdateCallbacks []func(val float64) }
func (*S4) Bind ¶
func (inc *S4) Bind(updater indicator.KLineWindowUpdater)
func (*S4) CalculateAndUpdate ¶ added in v1.37.0
func (*S4) EmitUpdate ¶
type S5 ¶
type S5 struct { types.IntervalWindow // Values Values floats.Slice EndTime time.Time UpdateCallbacks []func(val float64) }
func (*S5) Bind ¶
func (inc *S5) Bind(updater indicator.KLineWindowUpdater)
func (*S5) CalculateAndUpdate ¶ added in v1.37.0
func (*S5) EmitUpdate ¶
type S6 ¶
type S6 struct { types.IntervalWindow // Values Values floats.Slice EndTime time.Time UpdateCallbacks []func(val float64) }
func (*S6) Bind ¶
func (inc *S6) Bind(updater indicator.KLineWindowUpdater)
func (*S6) CalculateAndUpdate ¶ added in v1.37.0
func (*S6) EmitUpdate ¶
type S7 ¶
type S7 struct { types.IntervalWindow // Values Values floats.Slice EndTime time.Time UpdateCallbacks []func(val float64) }
func (*S7) Bind ¶
func (inc *S7) Bind(updater indicator.KLineWindowUpdater)
func (*S7) CalculateAndUpdate ¶ added in v1.37.0
func (*S7) EmitUpdate ¶
type Strategy ¶
type Strategy struct { Environment *bbgo.Environment Symbol string `json:"symbol"` Market types.Market Interval types.Interval `json:"interval"` Quantity fixedpoint.Value `json:"quantity"` // persistence fields Position *types.Position `json:"position,omitempty" persistence:"position"` ProfitStats *types.ProfitStats `json:"profitStats,omitempty" persistence:"profit_stats"` Spread fixedpoint.Value `json:"spread" persistence:"spread"` bbgo.QuantityOrAmount S0 *S0 S1 *S1 S2 *S2 S3 *S3 S4 *S4 S5 *S5 S6 *S6 S7 *S7 A2 *A2 A3 *A3 A18 *A18 A34 *A34 R *R // StrategyController bbgo.StrategyController // contains filtered or unexported fields }
func (*Strategy) ClosePosition ¶
func (*Strategy) InstanceID ¶
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)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.