Documentation ¶
Index ¶
Constants ¶
View Source
const ( KB = 1024 // Kilo Byte MB = 1024 * KB // Mega Byte GB = 1024 * MB // Giga Byte )
Variables ¶
View Source
var ( Application = "stock" MinVersion = "0.0.1" // 主程序版本号 )
View Source
var CmdBackTesting = &cmder.Command{ Use: "backtesting", Short: "回测", Run: func(cmd *cmder.Command, args []string) { securityCode = strings.TrimSpace(securityCode) securityCode = exchange.CorrectSecurityCode(securityCode) if len(securityCode) > 0 { tracker.CheckStrategy(strategyCode, securityCode, date) } else { tracker.BackTesting(strategyCode, days, topN) } }, }
CmdBackTesting 回测
View Source
var CmdBestIP = &cmder.Command{ Use: "bestip", Short: "检测服务器网速", Run: func(cmd *cmder.Command, args []string) { quotes.BestIP() }, }
CmdBestIP 检测服务器地址
View Source
var CmdConfig = &cmder.Command{ Use: "config", Short: "显示配置信息", Run: func(cmd *cmder.Command, args []string) { data, err := yaml.Marshal(config.GlobalConfig) if err != nil { fmt.Println(err) } else { fmt.Println(api.Bytes2String(data)) } }, }
CmdConfig 显示配置信息
View Source
var (
CmdPrint *cmder.Command = nil // CmdPrint 打印命令
)
View Source
var ( // CmdRepair 补登历史数据 CmdRepair *cmder.Command = nil )
View Source
var CmdRules = &cmder.Command{ Use: "rules", Short: "规则", Args: func(cmd *cmder.Command, args []string) error { return nil }, PreRun: func(cmd *cmder.Command, args []string) { }, Run: func(cmd *cmder.Command, args []string) { rules.PrintRuleList() }, }
CmdRules 规则
View Source
var ( // CmdSafes 安全类-黑白名单 CmdSafes *cmder.Command = nil )
View Source
var ( // CmdService 守护进程 CmdService *cmder.Command )
View Source
var (
CmdTools *cmder.Command = nil // 工具集合
)
View Source
var (
CmdTracker *cmder.Command = nil // 实时跟踪
)
View Source
var ( // CmdUpdate 更新数据 CmdUpdate *cmder.Command = nil )
View Source
var CmdVersion = &cmder.Command{ Use: "version", Short: "显示版本号", Run: func(cmd *cmder.Command, args []string) { fmt.Println(MinVersion) }, }
CmdVersion 版本
Functions ¶
func UpdateApplicationName ¶ added in v0.2.3
func UpdateApplicationName(name string)
UpdateApplicationName 更新应用(Application)名称
func UpdateApplicationVersion ¶ added in v0.1.5
func UpdateApplicationVersion(v string)
UpdateApplicationVersion 更新版本号
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.