Documentation
¶
Index ¶
Constants ¶
View Source
const ( DirectLong TradeType = 1 DirectShort TradeType = 1 << 1 Limit TradeType = 1 << 3 Market TradeType = 1 << 4 Stop TradeType = 1 << 5 Open TradeType = 1 << 6 Close TradeType = 1 << 7 OpenLong = Open | DirectLong OpenShort = Open | DirectShort CloseLong = Close | DirectLong CloseShort = Close | DirectShort StopLong = Stop | DirectLong StopShort = Stop | DirectShort )
Variables ¶
View Source
var ( OrderStatusFilled = "FILLED" OrderStatusCanceled = "CANCELED" )
Functions ¶
This section is empty.
Types ¶
type Candle ¶
type Candle struct {
ID int64 `xorm:"pk autoincr null 'id'"`
Start int64 `xorm:"unique index 'start'"`
Open float64 `xorm:"notnull 'open'"`
High float64 `xorm:"notnull 'high'"`
Low float64 `xorm:"notnull 'low'"`
Close float64 `xorm:"notnull 'close'"`
VWP float64 `xorm:"notnull 'vwp'"`
Volume float64 `xorm:"notnull 'volume'"`
Trades int64 `xorm:"notnull 'trades'"`
Table string `xorm:"-"`
}
type CandleList ¶ added in v1.0.4
type CandleList []*Candle
CandleList candle list
func (CandleList) High ¶ added in v1.0.4
func (l CandleList) High() (ret float64)
func (CandleList) Low ¶ added in v1.0.4
func (l CandleList) Low() (ret float64)
func (CandleList) Merge ¶ added in v1.0.4
func (l CandleList) Merge() (ret *Candle)
Merge merge multi candle to one
type TradeAction ¶
TradeAction trade action
Click to show internal directories.
Click to hide internal directories.