src/core/sma.bend checks
raw source on the hub · import bend-ta@0.1.0.0/src/core/sma.bend as Sma
2 imports
import Base import ./rolling.bend as Rolling
Types
type State source · line 4 · raw
@-N:Data -> Type
Sma@-N:Data -> @period:U32 -> @ring:0xbb55196063fb99add8900a97dfe6ee2d/src/core/rolling.State<N> -> State<N>
Templates
template init source · line 7 · raw
@-N:Data -> @-from_u32:(@_:U32 -> N) -> @+period:U32 -> @depth:Nat -> State<N>
template emit source · line 10 · raw
@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-div:(@_:N -> @_:N -> N) -> @+period:U32 -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/rolling.State<N>, Maybe<&2, N>) -> Pair(State<N>, Maybe<&2, N>)
template next source · line 18 · raw
@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @state:State<N> -> @price:N -> Pair(State<N>, Maybe<&2, N>)