Documentation ¶
Index ¶
Constants ¶
View Source
const ID = "support"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Strategy ¶
type Strategy struct { *bbgo.Notifiability `json:"-"` *bbgo.Persistence *bbgo.Graceful `json:"-"` Symbol string `json:"symbol"` Market types.Market `json:"-"` // Interval for checking support Interval types.Interval `json:"interval"` // moving average window for checking support (support should be under the moving average line) MovingAverageWindow int `json:"movingAverageWindow"` // LongTermMovingAverage is the second moving average line for checking support position LongTermMovingAverage types.IntervalWindow `json:"longTermMovingAverage"` Quantity fixedpoint.Value `json:"quantity"` MinVolume fixedpoint.Value `json:"minVolume"` Sensitivity fixedpoint.Value `json:"sensitivity"` TakerBuyRatio fixedpoint.Value `json:"takerBuyRatio"` MarginOrderSideEffect types.MarginOrderSideEffectType `json:"marginOrderSideEffect"` Targets []Target `json:"targets"` ResistanceInterval types.Interval `json:"resistanceInterval"` ResistanceSensitivity fixedpoint.Value `json:"resistanceSensitivity"` ResistanceMinVolume fixedpoint.Value `json:"resistanceMinVolume"` ResistanceTakerBuyRatio fixedpoint.Value `json:"resistanceTakerBuyRatio"` // Min BaseAsset balance to keep MinBaseAssetBalance fixedpoint.Value `json:"minBaseAssetBalance"` // Max BaseAsset balance to buy MaxBaseAssetBalance fixedpoint.Value `json:"maxBaseAssetBalance"` MinQuoteAssetBalance fixedpoint.Value `json:"minQuoteAssetBalance"` ScaleQuantity *bbgo.PriceVolumeScale `json:"scaleQuantity"` // contains filtered or unexported fields }
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.