Documentation
¶
Index ¶
- type MACrossStrategy
- type RMICrossStrategy
- func (rmi *RMICrossStrategy) GetParams() []*K.Params
- func (rmi *RMICrossStrategy) Once(ctx *K.Context, ohlc *K.OHLC) error
- func (rmi *RMICrossStrategy) OrderEvent(orderEvent K.Event)
- func (rmi *RMICrossStrategy) PerBar(k int, callback K.Callback) error
- func (rmi *RMICrossStrategy) Update(k *int) error
- type RebalanceStrat
- func (rmi *RebalanceStrat) GetInterval() string
- func (rmi *RebalanceStrat) GetParams() []*K.Params
- func (rmi *RebalanceStrat) Once(ctx *K.Context, ohlc *K.OHLC) error
- func (rmi *RebalanceStrat) OrderEvent(orderEvent K.Event)
- func (rmi *RebalanceStrat) PerBar(k int, callback K.Callback) error
- func (rmi *RebalanceStrat) Rebalance(k int, date time.Time, callback K.Callback) error
- func (rmi *RebalanceStrat) Update(k *int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MACrossStrategy ¶
type MACrossStrategy struct {
// contains filtered or unexported fields
}
Strategy strategy
func (*MACrossStrategy) GetParams ¶
func (ma *MACrossStrategy) GetParams() []*K.Params
func (*MACrossStrategy) OrderEvent ¶
func (ma *MACrossStrategy) OrderEvent(orderEvent K.Event)
OrderEvent gets called on order events
func (*MACrossStrategy) PerBar ¶
func (ma *MACrossStrategy) PerBar(k int, callback K.Callback) error
Tick get called when there is new data coming in
func (*MACrossStrategy) Update ¶
func (ma *MACrossStrategy) Update(k *int) error
Update is called before perBar
type RMICrossStrategy ¶
type RMICrossStrategy struct {
// contains filtered or unexported fields
}
Strategy strategy
func (*RMICrossStrategy) GetParams ¶
func (rmi *RMICrossStrategy) GetParams() []*K.Params
func (*RMICrossStrategy) OrderEvent ¶
func (rmi *RMICrossStrategy) OrderEvent(orderEvent K.Event)
OrderEvent gets called on order events
func (*RMICrossStrategy) PerBar ¶
func (rmi *RMICrossStrategy) PerBar(k int, callback K.Callback) error
Tick get called when there is new data coming in
func (*RMICrossStrategy) Update ¶
func (rmi *RMICrossStrategy) Update(k *int) error
Update is called before perBar
type RebalanceStrat ¶
type RebalanceStrat struct {
ROC100 []float64
}
Strategy strategy
func (*RebalanceStrat) GetInterval ¶
func (rmi *RebalanceStrat) GetInterval() string
func (*RebalanceStrat) GetParams ¶
func (rmi *RebalanceStrat) GetParams() []*K.Params
func (*RebalanceStrat) OrderEvent ¶
func (rmi *RebalanceStrat) OrderEvent(orderEvent K.Event)
OrderEvent gets called on order events
func (*RebalanceStrat) PerBar ¶
func (rmi *RebalanceStrat) PerBar(k int, callback K.Callback) error
Tick get called when there is new data coming in
func (*RebalanceStrat) Update ¶
func (rmi *RebalanceStrat) Update(k *int) error
Update is called before perBar
Click to show internal directories.
Click to hide internal directories.