(apply-option state [path v])(apply-options state options)returns algo with options applied options is a map, keys are paths (vectors) and values are the values to set.
returns algo with options applied options is a map, keys are paths (vectors) and values are the values to set.
(create-algo-variations state variation-spec)input: template and variation spec returns a templates, with different option variations applied. example: (create-template-variations t :asset [:EURUSD :SPY :BTCUSD] :n [100 200 500])
input: template and variation spec
returns a templates, with different option
variations applied. example:
(create-template-variations t :asset [:EURUSD :SPY :BTCUSD]
:n [100 200 500])(dynamic-editor {:keys [state get-fn set-fn]} {:keys [path] :as options})(editor-with-label {:keys [value set-fn]} {:keys [name type style] :as options})(get-editor t)(make-variations variation-spec)returns a seq of different options that each can be applied to an algo
example: (make-variations [:x [1 2 3] :y [:a :b :c] :debug [true false]]) returns: ;; => ({:x 1, :y :a, :debug true} ;; {:x 1, :y :a, :debug false} ;; {:x 1, :y :b, :debug true} ;; {:x 1, :y :b, :debug false} ;; {:x 1, :y :c, :debug true} ;; {:x 1, :y :c, :debug false} ;; {:x 2, :y :a, :debug true} ;; {:x 2, :y :a, :debug false} ;; {:x 2, :y :b, :debug true} ;; {:x 2, :y :b, :debug false} ;; {:x 2, :y :c, :debug true} ;; {:x 2, :y :c, :debug false} ;; {:x 3, :y :a, :debug true} ;; {:x 3, :y :a, :debug false} ;; {:x 3, :y :b, :debug true} ;; {:x 3, :y :b, :debug false} ;; {:x 3, :y :c, :debug true} ;; {:x 3, :y :c, :debug false})
returns a seq of different options that each can be
applied to an algo
example:
(make-variations [:x [1 2 3]
:y [:a :b :c]
:debug [true false]])
returns:
;; => ({:x 1, :y :a, :debug true}
;; {:x 1, :y :a, :debug false}
;; {:x 1, :y :b, :debug true}
;; {:x 1, :y :b, :debug false}
;; {:x 1, :y :c, :debug true}
;; {:x 1, :y :c, :debug false}
;; {:x 2, :y :a, :debug true}
;; {:x 2, :y :a, :debug false}
;; {:x 2, :y :b, :debug true}
;; {:x 2, :y :b, :debug false}
;; {:x 2, :y :c, :debug true}
;; {:x 2, :y :c, :debug false}
;; {:x 3, :y :a, :debug true}
;; {:x 3, :y :a, :debug false}
;; {:x 3, :y :b, :debug true}
;; {:x 3, :y :b, :debug false}
;; {:x 3, :y :c, :debug true}
;; {:x 3, :y :c, :debug false})(options-ui
{:keys [class style]}
{:keys [current state options] :or {state (r/atom current)} :as _config})(options-ui2 {:keys [class style edit state set-fn get-fn]})(register-editor t f)(ui-state state options)(variation-keys variation-spec)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |