src/core/momentum_window.bend checks
raw source on the hub · import bend-ta@0.1.0.0/src/core/momentum_window.bend as Momentum_window
4 imports
import Base import ./extrema_queue.bend as Queue import ./bar.bend as Bar import ./window.bend as Window
Types
type Box source · line 6 · raw
@-N:Data -> Type
Box@-N:Data -> @period:U32 -> @range:0xbb55196063fb99add8900a97dfe6ee2d/src/core/extrema_queue.State<N> -> Box<N>
type Bounds source · line 9 · raw
@-N:Data -> Data
Bounds@-N:Data -> @size:U32 -> @high:N -> @low:N -> @up:U32 -> @down:U32 -> @close:N -> Bounds<N>
type Aroon source · line 12 · raw
@-N:Data -> Data
Aroon@-N:Data -> @down:N -> @up:N -> Aroon<N>
type Prices source · line 54 · raw
@-N:Data -> Type
Prices@-N:Data -> @period:U32 -> @window:0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<N> -> Prices<N>
type Scan source · line 57 · raw
@-N:Data -> Data
Scan@-N:Data -> @count:U32 -> @origin:N -> @last:N -> @low:N -> @high:N -> @changes:N -> Scan<N>
type Swing source · line 98 · raw
@-N:Data -> Data
Swing@-N:Data -> @limit:N -> @previous:Maybe<&2, 0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.OHLC<N>> -> @total:N -> Swing<N>
type WAD source · line 126 · raw
@-N:Data -> Data
WAD@-N:Data -> @previous:Maybe<&2, N> -> @total:N -> WAD<N>
Templates
template box.init source · line 15 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @+period:U32 -> @depth:Nat -> Box<N>
template box.output source · line 18 · raw
@-N:Data -> @period:U32 -> @close:N -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/extrema_queue.State<N>, Maybe<&2, 0xbb55196063fb99add8900a97dfe6ee2d/src/core/extrema_queue.Value<N>>) -> Pair(Box<N>, Maybe<&2, Bounds<N>>)
template box.next source · line 23 · raw
@-N:Data -> @-ge:(@_:N -> @_:N -> Bool) -> @-le:(@_:N -> @_:N -> Bool) -> @state:Box<N> -> @bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HLC<N> -> Pair(Box<N>, Maybe<&2, Bounds<N>>)
template scaled_zero source · line 27 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-abs:(@_:N -> N) -> @-le:(@_:N -> @_:N -> Bool) -> @+value:N -> @+a:N -> @+b:N -> Bool
template stochastic source · line 30 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-abs:(@_:N -> N) -> @-le:(@_:N -> @_:N -> Bool) -> @value:Bounds<N> -> @+flat:N -> N
template willr source · line 36 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-abs:(@_:N -> N) -> @-le:(@_:N -> @_:N -> Bool) -> @-min:(@_:N -> @_:N -> N) -> @-max:(@_:N -> @_:N -> N) -> @value:Bounds<N> -> N
template aroon source · line 43 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @value:Bounds<N> -> Aroon<N>
template aroonosc source · line 49 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @value:Bounds<N> -> N
template prices.init source · line 60 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @+period:U32 -> @depth:Nat -> Prices<N>
template prices.step source · line 63 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-abs:(@_:N -> N) -> @-min:(@_:N -> @_:N -> N) -> @-max:(@_:N -> @_:N -> N) -> @u:Unit -> @acc:Maybe<&2, Scan<N>> -> @+price:N -> Maybe<&2, Scan<N>>
template prices.folded source · line 71 · raw
@-N:Data -> @+period:U32 -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<N>, Maybe<&2, Scan<N>>) -> Pair(Prices<N>, Maybe<&2, Scan<N>>)
template prices.ready source · line 75 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-abs:(@_:N -> N) -> @-min:(@_:N -> @_:N -> N) -> @-max:(@_:N -> @_:N -> N) -> @+period:U32 -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<N>, Bool) -> Pair(Prices<N>, Maybe<&2, Scan<N>>)
template prices.pushed source · line 80 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-abs:(@_:N -> N) -> @-min:(@_:N -> @_:N -> N) -> @-max:(@_:N -> @_:N -> N) -> @+period:U32 -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<N>, Maybe<&2, N>) -> Pair(Prices<N>, Maybe<&2, Scan<N>>)
template prices.next source · line 84 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-abs:(@_:N -> N) -> @-min:(@_:N -> @_:N -> N) -> @-max:(@_:N -> @_:N -> N) -> @state:Prices<N> -> @+price:N -> Pair(Prices<N>, Maybe<&2, Scan<N>>)
template er source · line 88 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-abs:(@_:N -> N) -> @-min:(@_:N -> @_:N -> N) -> @-gt:(@_:N -> @_:N -> Bool) -> @value:Scan<N> -> N
template vhf source · line 93 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-gt:(@_:N -> @_:N -> Bool) -> @value:Scan<N> -> N
template swing.init source · line 101 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @+limit:N -> Swing<N>
template swing.value source · line 104 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-abs:(@_:N -> N) -> @-max:(@_:N -> @_:N -> N) -> @-eq:(@_:N -> @_:N -> Bool) -> @+limit:N -> @previous:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.OHLC<N> -> @bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.OHLC<N> -> N
template swing.next source · line 118 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-abs:(@_:N -> N) -> @-max:(@_:N -> @_:N -> N) -> @-eq:(@_:N -> @_:N -> Bool) -> @state:Swing<N> -> @+bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.OHLC<N> -> @+cumulative:Bool -> Pair(Swing<N>, Maybe<&2, N>)
template wad.next source · line 129 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-min:(@_:N -> @_:N -> N) -> @-max:(@_:N -> @_:N -> N) -> @-gt:(@_:N -> @_:N -> Bool) -> @state:WAD<N> -> @bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HLC<N> -> Pair(WAD<N>, Maybe<&2, N>)