Documentation
¶
Index ¶
- Constants
- type Date
- func (dt Date) AddDays(days int) Date
- func (dt Date) Day() int
- func (dt Date) Days(d Date) int
- func (dt Date) IsNil() bool
- func (dt Date) IsToday(loc *time.Location) bool
- func (dt Date) IsValid() bool
- func (dt Date) Month() int
- func (dt Date) String() string
- func (dt Date) ToDateTime(endDay bool, loc *time.Location) time.Time
- func (dt Date) Year() int
- type Time
- type TradingSession
- type TradingSlot
Constants ¶
View Source
const NilValue int = 9999
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TradingSession ¶
type TradingSession struct {
Slots []*TradingSlot `json:"slots"`
}
func NewTradingSession ¶ added in v0.0.5
func NewTradingSession(config string) (*TradingSession, error)
func (*TradingSession) CrossSessions ¶ added in v0.0.4
func (*TradingSession) CrossSlots ¶ added in v0.0.4
func (*TradingSession) FindSlot ¶ added in v0.0.6
func (ts *TradingSession) FindSlot(t time.Time) *TradingSlot
func (*TradingSession) Granularity ¶ added in v0.0.3
func (ts *TradingSession) Granularity() int
type TradingSlot ¶
type TradingSlot struct {
Day int `json:"day"`
Open Time `json:"open"`
Close Time `json:"close"`
EndSession bool `json:"end"`
}
func (*TradingSlot) MinutesSinceOpen ¶ added in v0.0.8
func (s *TradingSlot) MinutesSinceOpen(t time.Time) int
Click to show internal directories.
Click to hide internal directories.