Documentation ¶
Index ¶
Constants ¶
View Source
const ID = "trendtrader"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntervalWindowSetting ¶
type IntervalWindowSetting struct {
types.IntervalWindow
}
type Strategy ¶
type Strategy struct { Environment *bbgo.Environment Symbol string `json:"symbol"` Market types.Market types.IntervalWindow // persistence fields Position *types.Position `persistence:"position"` ProfitStats *types.ProfitStats `persistence:"profit_stats"` TradeStats *types.TradeStats `persistence:"trade_stats"` TrendLine *TrendLine `json:"trendLine"` ExitMethods bbgo.ExitMethodSet `json:"exits"` // StrategyController bbgo.StrategyController // contains filtered or unexported fields }
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)
type TrendLine ¶
type TrendLine struct { Symbol string Market types.Market `json:"-"` types.IntervalWindow PivotRightWindow int `json:"pivotRightWindow"` // MarketOrder is the option to enable market order short. MarketOrder bool `json:"marketOrder"` Quantity fixedpoint.Value `json:"quantity"` bbgo.QuantityOrAmount // contains filtered or unexported fields }
func (*TrendLine) Bind ¶
func (s *TrendLine) Bind(session *bbgo.ExchangeSession, orderExecutor *bbgo.GeneralOrderExecutor)
func (*TrendLine) Subscribe ¶
func (s *TrendLine) Subscribe(session *bbgo.ExchangeSession)
Click to show internal directories.
Click to hide internal directories.