feat: Implement Pipeline support
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.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
;; 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
|
||||
)
|
||||
Reference in New Issue
Block a user