Documentation
¶
Index ¶
- type Event
- type Signal
- func (s *Signal) GetBuyLimit() decimal.Decimal
- func (s *Signal) GetDirection() order.Side
- func (s *Signal) GetPrice() decimal.Decimal
- func (s *Signal) GetSellLimit() decimal.Decimal
- func (s *Signal) IsSignal() bool
- func (s *Signal) Pair() currency.Pair
- func (s *Signal) SetBuyLimit(f decimal.Decimal)
- func (s *Signal) SetDirection(st order.Side)
- func (s *Signal) SetPrice(f decimal.Decimal)
- func (s *Signal) SetSellLimit(f decimal.Decimal)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event interface {
common.EventHandler
common.Directioner
GetPrice() decimal.Decimal
IsSignal() bool
GetSellLimit() decimal.Decimal
GetBuyLimit() decimal.Decimal
}
Event handler is used for getting trade signal details Example Amount and Price of current candle tick
type Signal ¶
type Signal struct {
event.Base
OpenPrice decimal.Decimal
HighPrice decimal.Decimal
LowPrice decimal.Decimal
ClosePrice decimal.Decimal
Volume decimal.Decimal
BuyLimit decimal.Decimal
SellLimit decimal.Decimal
Direction order.Side
}
Signal contains everything needed for a strategy to raise a signal event
func (*Signal) GetBuyLimit ¶
GetBuyLimit returns the buy limit
func (*Signal) GetDirection ¶
GetDirection returns the direction
func (*Signal) GetSellLimit ¶
GetSellLimit returns the sell limit
func (*Signal) SetBuyLimit ¶
SetBuyLimit sets the buy limit
func (*Signal) SetDirection ¶
SetDirection sets the direction
func (*Signal) SetSellLimit ¶
SetSellLimit sets the sell limit
Click to show internal directories.
Click to hide internal directories.