Skip to content

Commit

Permalink
removed quanta-studio related code from calendar-info
Browse files Browse the repository at this point in the history
  • Loading branch information
wizard50 committed Oct 12, 2024
1 parent 1e78bbc commit fa95a5a
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions lib/calendar/src/quanta/calendar/calendar_info.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
[tick.core :as t]
[ta.calendar.core :as cal]
[ta.calendar.calendars :as caldb]
[ta.calendar.helper :as calhelp]
;[missionary.core :as m]
))
[ta.calendar.helper :as calhelp]))

(defn market-info [market-kw]
(let [cal (caldb/get-calendar market-kw)
Expand All @@ -28,34 +26,11 @@
:current (t/instant current-close-dt)
:next (t/instant (cal/next-close calendar-kw interval-kw current-close-dt)))))

(defn gather-calendars [dt]
(let [cals (for [c [:us :crypto :forex
:eu :jp]
i [:m :m5 :m15 :h :d]]
(gather-calendar c i dt))]
{:dt dt
:cals cals}))

;(defn calendar-time []
; ;(m/stream
; (m/ap
; (loop [dt (t/instant)]
; (let [cal (gather-calendars dt)]
; (m/amb
; (m/? (m/sleep 500 cal))
; (recur (t/instant)))))))

(comment
(market-info :crypto)
(market-info :eu)

(gather-calendar :crypto :m (t/instant))

(gather-calendars (t/instant))

(filter #(= true (:business %)) (:cals (gather-calendars (t/instant))))

(filter #(= (last (:calendar %)) :d) (:cals (gather-calendars (t/instant))))

;
;
)

0 comments on commit fa95a5a

Please sign in to comment.