Documentation ¶
Index ¶
- Variables
- type Symbol
- func (s Symbol) CountBetweenTimes(t1, t2 time.Time) int64
- func (s Symbol) Duration() time.Duration
- func (s Symbol) IsAligned(t time.Time) bool
- func (s Symbol) Opt() *Symbol
- func (per Symbol) RoundInterval(start, end *time.Time) (time.Time, time.Time)
- func (s Symbol) RoundTime(t time.Time) time.Time
- func (s Symbol) String() string
- func (s Symbol) Validate() error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidPeriod = errors.New("invalid period")
)
Functions ¶
This section is empty.
Types ¶
type Symbol ¶
type Symbol string
func FromSeconds ¶
func FromString ¶
func UniqueArray ¶
func (Symbol) CountBetweenTimes ¶
CountBetweenTimes returns the number of candlesticks between times
func (Symbol) RoundInterval ¶
RoundInterval takes an interval (represented by start, end) and returns the closest time before or equal to 'start' corresponding to the period and the closest time after or equal to 'end' corresponding to the period.
Example: if M1 then 1:30 to 2:30 will become 1:00 to 3:00.
Click to show internal directories.
Click to hide internal directories.