From 547d20a5ccdcb8304109f2e04d406215fa888694 Mon Sep 17 00:00:00 2001 From: wizard50 Date: Mon, 14 Oct 2024 19:10:00 -0300 Subject: [PATCH 1/2] fix missing get-bar-window in ta.calendar.core --- lib/calendar/src/ta/calendar/core.clj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/calendar/src/ta/calendar/core.clj b/lib/calendar/src/ta/calendar/core.clj index a7f261af..96d3c260 100644 --- a/lib/calendar/src/ta/calendar/core.clj +++ b/lib/calendar/src/ta/calendar/core.clj @@ -60,6 +60,9 @@ (defn calendar-seq->range [cal-seq] (cal/calendar-seq->range cal-seq)) +(defn get-bar-window [[calendar-kw interval-kw] bar-end-dt] + (cal/get-bar-window [calendar-kw interval-kw] bar-end-dt)) + (defn get-bar-duration [[calendar-kw interval-kw]] (cal/get-bar-duration [calendar-kw interval-kw])) From c135e70abcbad76223e9eebb19b51e727f8dc55f Mon Sep 17 00:00:00 2001 From: wizard50 Date: Mon, 14 Oct 2024 22:31:28 -0300 Subject: [PATCH 2/2] added more minute intervals --- lib/calendar/src/ta/calendar/interval.clj | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/calendar/src/ta/calendar/interval.clj b/lib/calendar/src/ta/calendar/interval.clj index 8f6c7b0e..c4e25365 100644 --- a/lib/calendar/src/ta/calendar/interval.clj +++ b/lib/calendar/src/ta/calendar/interval.clj @@ -109,11 +109,31 @@ :m4 (gen-intraday-step-fn 4 :minutes) :m5 (gen-intraday-step-fn 5 :minutes) :m6 (gen-intraday-step-fn 6 :minutes) + :m8 (gen-intraday-step-fn 8 :minutes) + :m9 (gen-intraday-step-fn 9 :minutes) :m10 (gen-intraday-step-fn 10 :minutes) :m12 (gen-intraday-step-fn 12 :minutes) :m15 (gen-intraday-step-fn 15 :minutes) + :m16 (gen-intraday-step-fn 16 :minutes) + :m18 (gen-intraday-step-fn 18 :minutes) :m20 (gen-intraday-step-fn 20 :minutes) - :m30 (gen-intraday-step-fn 30 :minutes)}) + :m24 (gen-intraday-step-fn 24 :minutes) + :m30 (gen-intraday-step-fn 30 :minutes) + :m32 (gen-intraday-step-fn 32 :minutes) + :m36 (gen-intraday-step-fn 36 :minutes) + :m40 (gen-intraday-step-fn 40 :minutes) + :m48 (gen-intraday-step-fn 48 :minutes) + + :m72 (gen-intraday-step-fn 72 :minutes) + :m80 (gen-intraday-step-fn 80 :minutes) + :m90 (gen-intraday-step-fn 90 :minutes) + :m96 (gen-intraday-step-fn 96 :minutes) + :m144 (gen-intraday-step-fn 144 :minutes) + :m160 (gen-intraday-step-fn 160 :minutes) + :m288 (gen-intraday-step-fn 288 :minutes)}) + +; all divider of 1440 (minutes of day) +;1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 30, 32, 36, 40, 48, 60, 72, 80, 90, 96, 120, 144, 160, 180, 240, 288, 360, 480, 720, 1440 (defn interval-exists? [interval-kw] (contains? intervals interval-kw))