Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forex :h calendar bug for next and prior open #39

Open
wizard50 opened this issue Oct 12, 2024 · 0 comments
Open

forex :h calendar bug for next and prior open #39

wizard50 opened this issue Oct 12, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@wizard50
Copy link
Collaborator

wizard50 commented Oct 12, 2024

` ; bug. expexted time is 16:00
(let [calendar (:forex calendars)
interval (:h intervals)
prior-open-dt (:prior-open interval)]
(prior-open-dt calendar (t/in (t/date-time "2024-02-06T17:00") "America/New_York")))
;=> #time/zoned-date-time"2024-02-02T15:30-05:00[America/New_York]"

; bug. expexted time is 16:00
(let [calendar (:forex calendars)
interval (:h intervals)
next-open-dt (:next-open interval)]
(next-open-dt calendar (t/in (t/date-time "2024-02-06T15:30") "America/New_York")))
;=> #time/zoned-date-time"2024-02-07T17:00-05:00[America/New_York]"`

; bug. expected time is 16:30
(let [calendar (:forex calendars)
interval (:h intervals)
prior-close-dt (:prior-close interval)]
(prior-close-dt calendar (t/in (t/date-time "2024-02-06T17:00") "America/New_York")))
;=> #time/zoned-date-time"2024-02-06T16:00-05:00[America/New_York]"

bugs only exist for forex :h around the uncomplete 16:30h bar.

@wizard50 wizard50 added the bug Something isn't working label Oct 12, 2024
@wizard50 wizard50 self-assigned this Oct 12, 2024
@wizard50 wizard50 changed the title forex calendar bug for next and prior open forex :h calendar bug for next and prior open Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant