~/bend-docscommunity

src/core/volume.bend checks

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

5 imports
import Base
import ./bar.bend as Bar
import ./window.bend as Window
import ./ema.bend as Ema
import ./rolling_average.bend as Average

Types

type IndexKind source · line 7 · raw

Data

type Index source · line 13 · raw

@-N:Data -> Data

type Flow source · line 66 · raw

@-N:Data -> Data

type Force source · line 141 · raw

@-N:Data -> Data

type Ease source · line 161 · raw

@-N:Data -> Type

Definitions

def index.origin source · line 16 · raw

@kind:IndexKind -> U32

Templates

template index.init source · line 22 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @+kind:IndexKind -> Index<N>

template index.scaled source · line 25 · raw

@-N:Data -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-finite:(@_:N -> Bool) -> @+total:N -> @current:N -> @+previous:N -> @scale:N -> @retain_finite:Bool -> @active:Bool -> N

template index.value source · line 35 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-eq:(@_:N -> @_:N -> Bool) -> @-lt:(@_:N -> @_:N -> Bool) -> @-gt:(@_:N -> @_:N -> Bool) -> @-finite:(@_:N -> Bool) -> @kind:IndexKind -> @+total:N -> @before:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.CV<N> -> @current:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.CV<N> -> N

template index.next source · line 51 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-eq:(@_:N -> @_:N -> Bool) -> @-lt:(@_:N -> @_:N -> Bool) -> @-gt:(@_:N -> @_:N -> Bool) -> @-finite:(@_:N -> Bool) -> @state:Index<N> -> @+current:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.CV<N> -> Pair(Index<N>, Maybe<&2, N>)

template money.value source · line 69 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @+high:N -> @+low:N -> @+close:N -> @volume:N -> @range:N -> @positive:Bool -> N

template money source · line 77 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-gt:(@_:N -> @_:N -> Bool) -> @bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HLCV<N> -> N

template ad.next source · line 86 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-gt:(@_:N -> @_:N -> Bool) -> @total:N -> @bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HLCV<N> -> Pair(N, Maybe<&2, N>)

template cmf.init source · line 93 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @period:U32 -> @depth:Nat -> 0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<Flow<N>>

template flow.add source · line 97 · raw

@-N:Data -> @-add:(@_:N -> @_:N -> N) -> @context:Unit -> @sum:Flow<N> -> @value:Flow<N> -> Flow<N>

template cmf.ratio source · line 102 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-div:(@_:N -> @_:N -> N) -> @money:N -> @volume:N -> @positive:Bool -> N

template cmf.emit source · line 107 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-div:(@_:N -> @_:N -> N) -> @-gt:(@_:N -> @_:N -> Bool) -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<Flow<N>>, Flow<N>) -> Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<Flow<N>>, Maybe<&2, N>)

template cmf.read source · line 115 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-gt:(@_:N -> @_:N -> Bool) -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<Flow<N>>, Bool) -> Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<Flow<N>>, Maybe<&2, N>)

template cmf.pushed source · line 125 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-gt:(@_:N -> @_:N -> Bool) -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<Flow<N>>, Maybe<&2, Flow<N>>) -> Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<Flow<N>>, Maybe<&2, N>)

template cmf.next source · line 132 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-gt:(@_:N -> @_:N -> Bool) -> @state:0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<Flow<N>> -> @+bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HLCV<N> -> Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/window.State<Flow<N>>, Maybe<&2, N>)

template force.init source · line 144 · raw

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

template force.emit source · line 147 · raw

@-N:Data -> @close:N -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/ema.State<N>, Maybe<&2, N>) -> Pair(Force<N>, Maybe<&2, N>)

template force.next source · line 151 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @state:Force<N> -> @bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.CV<N> -> Pair(Force<N>, Maybe<&2, N>)

template ease.init source · line 164 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @period:U32 -> @depth:Nat -> @divisor:N -> Ease<N>

template ease.divide source · line 167 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-div:(@_:N -> @_:N -> N) -> @delta:N -> @box:N -> @zero:Bool -> N

template ease.value source · line 172 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-div:(@_:N -> @_:N -> N) -> @-eq:(@_:N -> @_:N -> Bool) -> @delta:N -> @range:N -> @volume:N -> @divisor:N -> @flat:Bool -> N

template ease.emit source · line 182 · raw

@-N:Data -> @close:N -> @divisor:N -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/rolling_average.State<N>, Maybe<&2, N>) -> Pair(Ease<N>, Maybe<&2, N>)

template ease.sample source · line 187 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-eq:(@_:N -> @_:N -> Bool) -> @-abs:(@_:N -> N) -> @-le:(@_:N -> @_:N -> Bool) -> @previous:Maybe<&2, N> -> @average:0xbb55196063fb99add8900a97dfe6ee2d/src/core/rolling_average.State<N> -> @+divisor:N -> @+mid:N -> @+range:N -> @volume:N -> Pair(Ease<N>, Maybe<&2, N>)

template ease.next source · line 198 · raw

@-N:Data -> @-from_u32:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-eq:(@_:N -> @_:N -> Bool) -> @-abs:(@_:N -> N) -> @-le:(@_:N -> @_:N -> Bool) -> @state:Ease<N> -> @bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HLV<N> -> Pair(Ease<N>, Maybe<&2, N>)