Documentation ¶
Index ¶
Constants ¶
View Source
const ( PERIOD_UNIT_MINUTE = iota // M, MINUTE PERIOD_UNIT_DAY // D, DAY PERIOD_UNIT_WEEK // W, WEEK PERIOD_UNIT_MONTH // N, MONTH PERIOD_UNIT_QUARTER // Q, QUARTER PERIOD_UNIT_YEAR // Y, YEAR )
Variables ¶
View Source
var (
_, PERIOD_M = PeriodFromString("M1")
_, PERIOD_M5 = PeriodFromString("M5")
_, PERIOD_M15 = PeriodFromString("M15")
_, PERIOD_M30 = PeriodFromString("M30")
_, PERIOD_M60 = PeriodFromString("M60")
_, PERIOD_D = PeriodFromString("D1")
_, PERIOD_W = PeriodFromString("W1")
_, PERIOD_MONTH = PeriodFromString("N1")
_, PERIOD_Q = PeriodFromString("Q1")
_, PERIOD_Y = PeriodFromString("Y1")
)
Functions ¶
This section is empty.
Types ¶
type Period ¶
type Period interface { Name() string ShortName() string DisplayName() string Unit() PeriodUnit UnitCount() int Eq(other Period) bool Lt(other Period) bool Gt(other Period) bool CanConvertTo(other Period) bool CanConvertFrom(other Period) bool BasicMergePeriod() Period KLinePerDay(nMinutes int) int }
func PeriodFromString ¶
periodStr format: M1 or MINUTE1
func PeriodFromStringUnsafe ¶
type PeriodUnit ¶
type PeriodUnit int
Click to show internal directories.
Click to hide internal directories.