~/bend-docscommunity

src/core/trend_state.bend checks

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

3 imports
import Base
import ./bar.bend as Bar
import ./volatility.bend as Volatility

Types

type McGinley source · line 5 · raw

@-N:Data -> Data

type Bands source · line 9 · raw

@-N:Data -> Data

type Supertrend source · line 13 · raw

@-N:Data -> Data

type TrendValue source · line 17 · raw

@-N:Data -> Data

type SarConfig source · line 21 · raw

@-N:Data -> Data

type SarLive source · line 25 · raw

@-N:Data -> Data

type Sar source · line 29 · raw

@-N:Data -> Data

Templates

template mcgd.init source · line 33 · raw

@-N:Data -> @period:U32 -> McGinley<N>

template mcgd.next source · line 37 · raw

@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-finite:(@_:N -> Bool) -> @state:McGinley<N> -> @+price:N -> Pair(McGinley<N>, Maybe<&2, N>)

template supertrend.init source · line 49 · raw

@-N:Data -> @-from:(@_:U32 -> N) -> @-div:(@_:N -> @_:N -> N) -> @period:U32 -> @multiplier:N -> Supertrend<N>

template supertrend.bands source · line 53 · raw

@-N:Data -> @-lt:(@_:N -> @_:N -> Bool) -> @+upper:N -> @+lower:N -> @+close:N -> @before:Maybe<&2, Bands<N>> -> Bands<N>

template supertrend.emit source · line 63 · raw

@-N:Data -> @atr:0xbb55196063fb99add8900a97dfe6ee2d/src/core/volatility.Atr<N> -> @multiplier:N -> @bands:Bands<N> -> Pair(Supertrend<N>, Maybe<&2, TrendValue<N>>)

template supertrend.banded source · line 68 · raw

@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-lt:(@_:N -> @_:N -> Bool) -> @+multiplier:N -> @bands:Maybe<&2, Bands<N>> -> @atr:0xbb55196063fb99add8900a97dfe6ee2d/src/core/volatility.Atr<N> -> @value:N -> @bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HLC<N> -> Pair(Supertrend<N>, Maybe<&2, TrendValue<N>>)

template supertrend.atr source · line 76 · raw

@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-lt:(@_:N -> @_:N -> Bool) -> @+multiplier:N -> @bands:Maybe<&2, Bands<N>> -> @bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HLC<N> -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/volatility.Atr<N>, Maybe<&2, N>) -> Pair(Supertrend<N>, Maybe<&2, TrendValue<N>>)

template supertrend.next source · line 82 · 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) -> @-lt:(@_:N -> @_:N -> Bool) -> @state:Supertrend<N> -> @+bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HLC<N> -> Pair(Supertrend<N>, Maybe<&2, TrendValue<N>>)

template sar.init source · line 87 · raw

@-N:Data -> @-min:(@_:N -> @_:N -> N) -> @start:N -> @offset:N -> @+li:N -> @+ls:N -> @+lm:N -> @+si:N -> @+ss:N -> @+sm:N -> @signed:Bool -> Sar<N>

template sar.advance source · line 91 · raw

@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-min:(@_:N -> @_:N -> N) -> @-max:(@_:N -> @_:N -> N) -> @-le:(@_:N -> @_:N -> Bool) -> @-lt:(@_:N -> @_:N -> Bool) -> @+config:SarConfig<N> -> @live:SarLive<N> -> @+bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HL<N> -> Pair(Sar<N>, Maybe<&2, N>)

template sar.seed source · line 107 · raw

@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-min:(@_:N -> @_:N -> N) -> @-max:(@_:N -> @_:N -> N) -> @-le:(@_:N -> @_:N -> Bool) -> @-lt:(@_:N -> @_:N -> Bool) -> @-eq:(@_:N -> @_:N -> Bool) -> @-abs:(@_:N -> N) -> @+config:SarConfig<N> -> @first:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HL<N> -> @+bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HL<N> -> Pair(Sar<N>, Maybe<&2, N>)

template sar.next source · line 117 · raw

@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-min:(@_:N -> @_:N -> N) -> @-max:(@_:N -> @_:N -> N) -> @-le:(@_:N -> @_:N -> Bool) -> @-lt:(@_:N -> @_:N -> Bool) -> @-eq:(@_:N -> @_:N -> Bool) -> @-abs:(@_:N -> N) -> @state:Sar<N> -> @+bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HL<N> -> Pair(Sar<N>, Maybe<&2, N>)