Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetYesterdayClose ¶
Types ¶
type Period ¶
type Period struct { Symbol string `xorm:"-" json:"-"` OpenAt utils.Time `xorm:"notnull timestamp unique(open_at) default CURRENT_TIMESTAMP" json:"open_at"` //开盘时间 CloseAt utils.Time `xorm:"notnull timestamp default CURRENT_TIMESTAMP" json:"close_at"` // 收盘时间 Open string `xorm:"decimal(30, 10) notnull" json:"open"` //开盘价 High string `xorm:"decimal(30, 10) notnull" json:"high"` // 最高价 Low string `xorm:"decimal(30, 10) notnull" json:"low"` //最低价 Close string `xorm:"decimal(30, 10) notnull" json:"close"` //收盘价(当前K线未结束的即为最新价) Volume string `xorm:"decimal(30, 10) notnull" json:"volume"` //成交量 Amount string `xorm:"decimal(30, 10) notnull" json:"amount"` //成交额 CreateTime utils.Time `xorm:"timestamp created" json:"-"` UpdateTime utils.Time `xorm:"timestamp updated" json:"-"` Interval PeriodType `xorm:"-" json:"-"` LastOpenTime int64 `xorm:"-" json:"last_open_time"` LastCloseTime int64 `xorm:"-" json:"last_close_time"` // contains filtered or unexported fields }
func GetTodyStats ¶ added in v0.1.7
func NewPeriod ¶
func NewPeriod(symbol string, p PeriodType, tr trading_core.TradeResult) *Period
type PeriodType ¶
type PeriodType string
const ( PERIOD_M1 PeriodType = "m1" PERIOD_M3 PeriodType = "m3" PERIOD_M5 PeriodType = "m5" PERIOD_M15 PeriodType = "m15" PERIOD_M30 PeriodType = "m30" PERIOD_H1 PeriodType = "h1" PERIOD_H2 PeriodType = "h2" PERIOD_H4 PeriodType = "h4" PERIOD_H6 PeriodType = "h6" PERIOD_H8 PeriodType = "h8" PERIOD_H12 PeriodType = "h12" PERIOD_D1 PeriodType = "d1" PERIOD_D3 PeriodType = "d3" PERIOD_W1 PeriodType = "w1" PERIOD_MN PeriodType = "mn" )
func Periods ¶
func Periods() []PeriodType
Click to show internal directories.
Click to hide internal directories.