need to fix market hours range tick size estimation
This commit is contained in:
parent
7ba2992824
commit
51f3cca5d7
6 changed files with 56 additions and 232 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue