2457eec1bf
Adds support for pipelines, allowing streams to be chained together and transformed. This includes new types for `PipeStream` and `SourceAdapter`, along with modifications to the `Environment` to manage pipeline execution. A new example `pipeline.myc` demonstrates its usage.
23 lines
317 B
Plaintext
23 lines
317 B
Plaintext
;; Output: (does not matter)
|
|
|
|
(do
|
|
(def src1 (create-random-ohlc 42 3))
|
|
|
|
(def combined
|
|
(pipe [src1]
|
|
(fn [t1]
|
|
(.close t1)
|
|
)
|
|
)
|
|
)
|
|
|
|
(def my_indicator
|
|
(pipe [combined]
|
|
(fn [close_price]
|
|
(+ close_price 10.0)
|
|
)
|
|
)
|
|
)
|
|
|
|
my_indicator
|
|
) |