need to fix market hours range tick size estimation

This commit is contained in:
Will Charczuk 2017-05-14 18:58:10 -07:00
parent 7ba2992824
commit 51f3cca5d7
6 changed files with 56 additions and 232 deletions

View file

@ -60,8 +60,8 @@ func (tu timeUtil) MarketDayCloses(from, to time.Time, marketOpen, marketClose t
for cursor.Before(toClose) || cursor.Equal(toClose) {
isValidTradingDay := !isHoliday(cursor) && util.Date.IsWeekDay(cursor.Weekday())
if isValidTradingDay {
todayClose := util.Date.On(marketClose, cursor)
times = append(times, todayClose)
newValue := util.Date.NoonOn(cursor)
times = append(times, newValue)
}
cursor = util.Date.NextDay(cursor)