~/bend-docscommunity

src/core/ema.bend checks

raw source on the hub · import bend-ta@0.1.0.0/src/core/ema.bend as Ema

2 imports
import Base
import ./smoothing.bend as Smooth

Types

type State source · line 4 · raw

@-N:Data -> Data

Templates

template init.alpha source · line 8 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @period:U32 -> @alpha:N -> State<N>

template init source · line 12 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-div:(@_:N -> @_:N -> N) -> @+period:U32 -> State<N>

template seed.finish source · line 15 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @+period:U32 -> @seen:U32 -> @alpha:N -> @+origin:N -> @sum:N -> @ready:Bool -> Pair(State<N>, Maybe<&2, N>)

template seed.next source · line 26 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @+period:U32 -> @seen:U32 -> @alpha:N -> @+origin:N -> @sum:N -> @price:N -> @first:Bool -> Pair(State<N>, Maybe<&2, N>)

template live source · line 37 · raw

@-N:Data -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @+period:U32 -> @+alpha:N -> @previous:N -> @+price:N -> @identity:Bool -> Pair(State<N>, Maybe<&2, N>)

template next source · line 48 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @state:State<N> -> @price:N -> Pair(State<N>, Maybe<&2, N>)