Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultStrategy = ModelHousNo1 KLineMin = 89 // K线最少记录数 )
View Source
const ( // MaximumResultDays 结果最大天数 MaximumResultDays int = 3 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ModelNo1 ¶
type ModelNo1 struct { }
ModelNo1 1号模型
FormulaNo1 3天内5天线上穿10天线,10天线上穿20天线的个股 count(cross(MA(c,5),MA(c,10)),3)>=1 and count(cross(MA(c,10),MA(c,20)),3)>=1
type ResultInfo ¶
type ResultInfo struct { Code string `name:"证券代码" json:"code" csv:"code" array:"0"` Name string `name:"证券名称" json:"name" csv:"name" array:"1"` Date string `name:"信号日期" json:"date" csv:"date" array:"2"` TurnZ float64 `name:"开盘换手Z" json:"turn_z" csv:"turn_z" arrar:"3"` Rate float64 `name:"涨跌幅%" json:"rate" csv:"rate"` Buy float64 `name:"委托价格" json:"buy" csv:"buy" array:"3"` Sell float64 `name:"目标价格" json:"sell" csv:"sell" array:"4"` StrategyCode int `name:"策略编码" json:"strategy_code" csv:"strategy_code" array:"5"` StrategyName string `name:"策略名称" json:"strategy_name" csv:"strategy_name" array:"6"` //BlockCode string `name:"板块代码" json:"block_code" csv:"block_code" array:"7"` BlockType string `name:"板块类型"` BlockName string `name:"板块名称" json:"block_name" csv:"block_name" array:"7"` BlockRate float64 `name:"板块涨幅%" json:"block_rate" csv:"block_rate" array:"8"` BlockTop int `name:"板块排名" json:"block_top" csv:"block_top" array:"9"` BlockRank int `name:"个股排名" json:"block_rank" csv:"block_top" array:"10"` BlockZhangTing string `name:"板块涨停数" json:"block_zhangting" csv:"block_zhangting" array:"11"` BlockDescribe string `name:"上涨/下跌/平盘" json:"block_describe" csv:"block_describe" array:"12"` //BlockTopCode string `name:"领涨股代码" json:"block_top_code" csv:"block_top_code" array:"12"` BlockTopName string `name:"领涨股名称" json:"block_top_name" csv:"block_top_name" array:"13"` BlockTopRate float64 `name:"领涨股涨幅%" json:"block_top_rate" csv:"block_top_rate" array:"14"` Tendency string `name:"短线趋势" json:"tendency" csv:"tendency" array:"15"` }
ResultInfo 策略结果
type Strategy ¶
type Strategy interface { // Code 策略编号 Code() ModelKind // Name 策略名称 Name() string // Evaluate 评估 日线数据 Evaluate(securityCode string, result *treemap.Map) }
Strategy 策略/公式指标(features)接口
type StrategyWrap ¶
Click to show internal directories.
Click to hide internal directories.