You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
812 B

package strategy
import (
"sig-pub/pkg/indicator"
"sig-pub/pkg/types"
"sig-pub/pkg/types/series"
)
// IExchangesSigStrategy 多交易所策略
type IExchangesSigStrategy interface {
ISigStrategy
}
// IExchangesIntervalsStrategy 多交易所多周期策略
type IExchangesIntervalsStrategy interface {
ISigStrategy
}
// IExchangesSigStrategyContext 策略外部访问能力
// klineSeries, Indicator
type IExchangesSigStrategyContext interface {
Buy() // 发出多信号
Sell() // 发出空信号
// Get [0]当前k线
Get(interval types.Interval, offset int16) types.Kline
// Series [offset...end]
Series(interval types.Interval, offset, count int16) (klines series.Klines)
// 获取窗口类型指标
IndicatorW(interval types.Interval, name string, window int16) indicator.IIndicatorSeries
}