Skip to content

Commit

Permalink
joseph trendline edge style
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Sep 1, 2023
1 parent 1bc2245 commit 3fd1894
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions app/demo/src/demo/algo/joseph.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
[tick.core :as t]
[ta.helper.date :refer [parse-date epoch-second->datetime ->epoch-second ]]
[ta.algo.manager :refer [add-algo]]
[ta.tradingview.chart.plot :refer [plot-type]]
[ta.tradingview.chart.plot :refer [plot-type linestyle]]
[ta.tradingview.chart.shape :as shapes2]
[ta.tradingview.chart.color :refer [color]]
))



(def d parse-date)

(def trades
Expand Down Expand Up @@ -104,8 +106,11 @@
{:linecolor (if (= direction :long)
(color :lightgreen)
(color :lightsalmon))
:linestyle (linestyle :dashed)
:text (str direction)
}
:showLabel true
:leftEnd 1
:rightEnd 1}
)])

(defn roundtrip-shapes [options epoch-start epoch-end]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,12 @@
(when algo-changed
(println "algo changed to: " algo)
(remove-indicators algo-ctx tv)
(remove-shapes tv)
(add-indicators-after-load algo-ctx tv))

(when symbol-changed
(println "symbol changed to: " symbol))
(println "symbol changed to: " symbol)
(remove-shapes tv))

(when (or symbol-changed algo-changed)
(println "resetting algo-ctx data..")
Expand Down

0 comments on commit 3fd1894

Please sign in to comment.