Versions in this module Expand all Collapse all v0 v0.0.1 May 4, 2024 Changes in this version + const ID + func KLineAmplitudeMapper(k types.KLine) float64 + func KLineHighPriceMapper(k types.KLine) float64 + func KLineLowPriceMapper(k types.KLine) float64 + type A18 struct + EndTime time.Time + UpdateCallbacks []func(val float64) + Values floats.Slice + func (inc *A18) Bind(updater indicator.KLineWindowUpdater) + func (inc *A18) CalculateAndUpdate(klines []types.KLine) + func (inc *A18) EmitUpdate(val float64) + func (inc *A18) Last(int) float64 + func (inc *A18) OnUpdate(cb func(val float64)) + type A2 struct + EndTime time.Time + UpdateCallbacks []func(val float64) + Values floats.Slice + func (inc *A2) Bind(updater indicator.KLineWindowUpdater) + func (inc *A2) CalculateAndUpdate(klines []types.KLine) + func (inc *A2) EmitUpdate(val float64) + func (inc *A2) Last(int) float64 + func (inc *A2) OnUpdate(cb func(val float64)) + type A3 struct + EndTime time.Time + UpdateCallbacks []func(val float64) + Values floats.Slice + func (inc *A3) Bind(updater indicator.KLineWindowUpdater) + func (inc *A3) CalculateAndUpdate(klines []types.KLine) + func (inc *A3) EmitUpdate(val float64) + func (inc *A3) Last(int) float64 + func (inc *A3) OnUpdate(cb func(val float64)) + type A34 struct + EndTime time.Time + UpdateCallbacks []func(val float64) + Values floats.Slice + func (inc *A34) Bind(updater indicator.KLineWindowUpdater) + func (inc *A34) CalculateAndUpdate(klines []types.KLine) + func (inc *A34) EmitUpdate(val float64) + func (inc *A34) Last(int) float64 + func (inc *A34) OnUpdate(cb func(val float64)) + type IntervalWindowSetting struct + type KLineValueMapper func(k types.KLine) float64 + type R struct + EndTime time.Time + UpdateCallbacks []func(val float64) + Values floats.Slice + func (inc *R) Bind(updater indicator.KLineWindowUpdater) + func (inc *R) CalculateAndUpdate(klines []types.KLine) + func (inc *R) EmitUpdate(val float64) + func (inc *R) Last(int) float64 + func (inc *R) OnUpdate(cb func(val float64)) + type S0 struct + EndTime time.Time + UpdateCallbacks []func(val float64) + Values floats.Slice + func (inc *S0) Bind(updater indicator.KLineWindowUpdater) + func (inc *S0) CalculateAndUpdate(klines []types.KLine) + func (inc *S0) EmitUpdate(val float64) + func (inc *S0) Last(int) float64 + func (inc *S0) OnUpdate(cb func(val float64)) + type S1 struct + EndTime time.Time + UpdateCallbacks []func(value float64) + Values floats.Slice + func (inc *S1) Bind(updater indicator.KLineWindowUpdater) + func (inc *S1) CalculateAndUpdate(klines []types.KLine) + func (inc *S1) EmitUpdate(value float64) + func (inc *S1) Last(int) float64 + func (inc *S1) OnUpdate(cb func(value float64)) + type S2 struct + EndTime time.Time + UpdateCallbacks []func(value float64) + Values floats.Slice + func (inc *S2) Bind(updater indicator.KLineWindowUpdater) + func (inc *S2) CalculateAndUpdate(klines []types.KLine) + func (inc *S2) EmitUpdate(value float64) + func (inc *S2) Last(int) float64 + func (inc *S2) OnUpdate(cb func(value float64)) + type S3 struct + EndTime time.Time + UpdateCallbacks []func(val float64) + Values floats.Slice + func (inc *S3) Bind(updater indicator.KLineWindowUpdater) + func (inc *S3) CalculateAndUpdate(klines []types.KLine) + func (inc *S3) EmitUpdate(val float64) + func (inc *S3) Last(int) float64 + func (inc *S3) OnUpdate(cb func(val float64)) + type S4 struct + EndTime time.Time + UpdateCallbacks []func(val float64) + Values floats.Slice + func (inc *S4) Bind(updater indicator.KLineWindowUpdater) + func (inc *S4) CalculateAndUpdate(klines []types.KLine) + func (inc *S4) EmitUpdate(val float64) + func (inc *S4) Last(int) float64 + func (inc *S4) OnUpdate(cb func(val float64)) + type S5 struct + EndTime time.Time + UpdateCallbacks []func(val float64) + Values floats.Slice + func (inc *S5) Bind(updater indicator.KLineWindowUpdater) + func (inc *S5) CalculateAndUpdate(klines []types.KLine) + func (inc *S5) EmitUpdate(val float64) + func (inc *S5) Last(int) float64 + func (inc *S5) OnUpdate(cb func(val float64)) + type S6 struct + EndTime time.Time + UpdateCallbacks []func(val float64) + Values floats.Slice + func (inc *S6) Bind(updater indicator.KLineWindowUpdater) + func (inc *S6) CalculateAndUpdate(klines []types.KLine) + func (inc *S6) EmitUpdate(val float64) + func (inc *S6) Last(int) float64 + func (inc *S6) OnUpdate(cb func(val float64)) + type S7 struct + EndTime time.Time + UpdateCallbacks []func(val float64) + Values floats.Slice + func (inc *S7) Bind(updater indicator.KLineWindowUpdater) + func (inc *S7) CalculateAndUpdate(klines []types.KLine) + func (inc *S7) EmitUpdate(val float64) + func (inc *S7) Last(int) float64 + func (inc *S7) OnUpdate(cb func(val float64)) + type Strategy struct + A18 *A18 + A2 *A2 + A3 *A3 + A34 *A34 + Environment *bbgo.Environment + Interval types.Interval + Market types.Market + Position *types.Position + ProfitStats *types.ProfitStats + Quantity fixedpoint.Value + R *R + S0 *S0 + S1 *S1 + S2 *S2 + S3 *S3 + S4 *S4 + S5 *S5 + S6 *S6 + S7 *S7 + Spread fixedpoint.Value + Symbol string + 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)