features

package
v2.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicKLine

func BasicKLine(securityCode string) pandas.DataFrame

BasicKLine 基础日K线

func KLine

func KLine(securityCode string) pandas.DataFrame

KLine 加载日K线宽表

func KLineToWeekly

func KLineToWeekly(kline pandas.DataFrame) pandas.DataFrame

KLineToWeekly 日线转周线

deprecated: 不推荐使用

func MonthlyKLine

func MonthlyKLine(securityCode string, cacheKLine ...[]base.KLine) (df pandas.DataFrame)

MonthlyKLine 月K线

func SeriesIndexOf

func SeriesIndexOf(s stat.Series, n int) float64

func Tick deprecated

func Tick(securityCode string, dates []string) pandas.DataFrame

Tick 加载一个时间范围内的tick缓存数据

Deprecated: 弃用

func TickByDate

func TickByDate(code string, date string) pandas.DataFrame

TickByDate 获取指定日期的分笔成交数据

func WeeklyKLine

func WeeklyKLine(securityCode string, cacheKLine ...[]base.KLine) (df pandas.DataFrame)

WeeklyKLine 周线

Types

type ExchangeKLine

type ExchangeKLine struct {
	Date         string  // 日期
	Code         string  // 证券代码
	Shape        uint64  // K线形态
	MAV5         float64 // 5日均量
	VolumeRatio  float64 // 成交量比
	AveragePrice float64 // 均价线
	Change5      float64 // 5日涨幅
	Change10     float64 // 10日涨幅
	DBull        int     // 日线多头排列
	MA5D         float64 // 5日均线
	StepBack5D   bool    // 回踩5日均线
	MA10D        float64 // 10日均线
	StepBack10D  bool    // 回踩10日均线
	MA20D        float64 // 20日均线
	StepBack20D  bool    // 回踩20日均线
	WBull        int     // 周线多头排列
	MA5W         float64 // 5周均线
	StepBack5W   bool    // 回踩5周均线
	MA10W        float64 // 10周均线
	StepBack10W  bool    // 回踩10周均线
	MA20W        float64 // 20周均线
	StepBack20W  bool    // 回踩20周均线
	MBull        int     // 月线多头排列
	MA5M         float64 // 5月均线
	StepBack5M   bool    // 回踩5月均线
	MA10M        float64 // 10月均线
	StepBack10M  bool    // 回踩10月均线
	MA20M        float64 // 20月均线
	StepBack20M  bool    // 回踩20月均线
}

ExchangeKLine K线特征

func NewExchangeKLine

func NewExchangeKLine(code, date string) *ExchangeKLine

NewExchangeKLine 构建制定日期的K线数据

func (*ExchangeKLine) Kind

func (k *ExchangeKLine) Kind() factors.FeatureKind

func (*ExchangeKLine) Name

func (k *ExchangeKLine) Name() string

type MovingAverage

type MovingAverage struct {
	MA5  float64 // 5日均线
	MA10 float64 // 10日均线
	MA20 float64 // 20日均线
}

MovingAverage 移动平均线(MA)

type MovingAverageDisposed

type MovingAverageDisposed = int
const (
	MABearishArrangement MovingAverageDisposed = -1 // 5周期、10周期均线、20周期均线空头排列
	MA10AboveMA20        MovingAverageDisposed = 0  // 10周期均线在20周期均线上
	MA5AboveMA10         MovingAverageDisposed = 1  // 5周期均线在10周期均线之上
	MALongArrangement    MovingAverageDisposed = 2  // 5周期、10周期均线、20周期均线多头排列

)

type ShapeType

type ShapeType = uint64

ShapeType K线形态类型

const (
	KLineShapeYiZi                 ShapeType = 1 << iota // 1一字
	KLineShapeLimitUp                                    // 2涨停板
	KLineShapeLimitDown                                  // 3跌停板
	KLineShapeNoChanged                                  // 4平盘
	KLineShapeUp                                         // 5上涨
	KLineShapeDown                                       // 6下跌
	KLineShapeDoji                                       // 7十字星
	KLineShapeLongUpShadow                               // 8长上影线
	KLineShapeLongDownShadow                             // 9长下影线
	KLineShapeDaYangLine                                 // 10大阳线
	KLineShapeDaYinLine                                  // 11大阴线
	KLineShapeZhongYangLine                              // 12中阳线
	KLineShapeZhongYinLine                               // 13中阴线
	KLineShapeXiaoYangLine                               // 14小阳线
	KLineShapeXiaoYinLine                                // 15小阴线
	KLineShapeNotLimitUp                                 // 16炸板, 曾涨停
	KLineShapeNotLimitDown                               // 17曾跌停
	KLineShapeShrinkToHalf                               // 18第3日缩量到一半
	KLineShapeGrabChipInFinalRound                       // 19尾盘抢筹
	KLineShapeChant                                      // 20吟唱, 蓄力 配合大阳线
	KLineShapeStepBackDailyMA                            // 21日线-连续2个周期回踩均线
	KLineShapeStepBackWeeklyMA                           // 22周线-连续2个周期回踩均线
	KLineShapeStepBackMonthlyMA                          // 23月线-连续2个周期回踩均线
)

func KLineShape

func KLineShape(df pandas.DataFrame, securityCode string) (shape ShapeType)

KLineShape K线形态

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL