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.
23 lines
549 B
23 lines
549 B
package indicator |
|
|
|
import ( |
|
"sig-pub/pkg/types" |
|
"sig-pub/pkg/types/series" |
|
) |
|
|
|
// IIndicator 指标基础计算接口 |
|
type IIndicator interface { |
|
Calculate() (vector float64) |
|
} |
|
|
|
// IKlineSeries k线序列, strategy服务提供 |
|
type IKlineSeries interface { |
|
Get(offset int16) (kline types.Kline) |
|
Series(offset, count int16) (klines series.Klines) |
|
} |
|
|
|
// IIndicatorSeries 指标序列, 供策略读取, strategy服务提供 |
|
type IIndicatorSeries interface { |
|
Get(offset int16) (vector float64) |
|
Series(offset, count int16) (matrix series.Floats) |
|
}
|
|
|