src/core/volatility_window.bend checks
raw source on the hub · import bend-ta@0.1.0.0/src/core/volatility_window.bend as Volatility_window
5 imports
import Base import ./bar.bend as Bar import ./moments.bend as Moments import ./rolling_average.bend as Average import ./ema.bend as Ema
Types
type RogersSatchell source · line 7 · raw
@-N:Data -> Type
RogersSatchell@-N:Data -> @window:0xbb55196063fb99add8900a97dfe6ee2d/src/core/rolling_average.State<N> -> @scale:N -> RogersSatchell<N>
type Rvi source · line 10 · raw
@-N:Data -> Type
Rvi@-N:Data -> @window:0xbb55196063fb99add8900a97dfe6ee2d/src/core/moments.Cached<N> -> @previous:Maybe<&2, N> -> @up:0xbb55196063fb99add8900a97dfe6ee2d/src/core/ema.State<N> -> @down:0xbb55196063fb99add8900a97dfe6ee2d/src/core/ema.State<N> -> Rvi<N>
type Rvir source · line 13 · raw
@-N:Data -> Type
Rvir@-N:Data -> @high:Rvi<N> -> @low:Rvi<N> -> Rvir<N>
Templates
template rogerssatchell.init source · line 16 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-sqrt:(@_:N -> N) -> @period:U32 -> @depth:Nat -> @annualization:N -> RogersSatchell<N>
template rogerssatchell.term.if source · line 19 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-log:(@_:N -> N) -> @+open:N -> @+high:N -> @+low:N -> @+close:N -> @valid:Bool -> N
template rogerssatchell.term source · line 24 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-log:(@_:N -> N) -> @-gt:(@_:N -> @_:N -> Bool) -> @bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.OHLC<N> -> N
template rogerssatchell.positive source · line 29 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-sqrt:(@_:N -> N) -> @+scale:N -> @window:0xbb55196063fb99add8900a97dfe6ee2d/src/core/rolling_average.State<N> -> @mean:N -> @positive:Bool -> Pair(RogersSatchell<N>, Maybe<&2, N>)
template rogerssatchell.emit source · line 34 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-sqrt:(@_:N -> N) -> @-gt:(@_:N -> @_:N -> Bool) -> @+scale:N -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/rolling_average.State<N>, Maybe<&2, N>) -> Pair(RogersSatchell<N>, Maybe<&2, N>)
template rogerssatchell.next source · line 40 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-sqrt:(@_:N -> N) -> @-log:(@_:N -> N) -> @-gt:(@_:N -> @_:N -> Bool) -> @-abs:(@_:N -> N) -> @-le:(@_:N -> @_:N -> Bool) -> @state:RogersSatchell<N> -> @bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.OHLC<N> -> Pair(RogersSatchell<N>, Maybe<&2, N>)
template rvi.init source · line 44 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-div:(@_:N -> @_:N -> N) -> @+period:U32 -> @deviation_period:U32 -> @depth:Nat -> Rvi<N>
template rvi.ratio.if source · line 48 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @up:N -> @total:N -> @zero:Bool -> N
template rvi.ratio source · line 53 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-eq:(@_:N -> @_:N -> Bool) -> @+up:N -> @down:N -> N
template rvi.emit source · line 57 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-eq:(@_:N -> @_:N -> Bool) -> @window:0xbb55196063fb99add8900a97dfe6ee2d/src/core/moments.Cached<N> -> @price:N -> @upr:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/ema.State<N>, Maybe<&2, N>) -> @dnr:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/ema.State<N>, Maybe<&2, N>) -> Pair(Rvi<N>, Maybe<&2, N>)
template rvi.deviation source · line 62 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-sqrt:(@_:N -> N) -> @-eq:(@_:N -> @_:N -> Bool) -> @-gt:(@_:N -> @_:N -> Bool) -> @previous:Maybe<&2, N> -> @+price:N -> @up:0xbb55196063fb99add8900a97dfe6ee2d/src/core/ema.State<N> -> @down:0xbb55196063fb99add8900a97dfe6ee2d/src/core/ema.State<N> -> @result:Pair(0xbb55196063fb99add8900a97dfe6ee2d/src/core/moments.Cached<N>, Maybe<&2, 0xbb55196063fb99add8900a97dfe6ee2d/src/core/moments.Value<N>>) -> Pair(Rvi<N>, Maybe<&2, N>)
template rvi.next source · line 69 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-sqrt:(@_:N -> N) -> @-eq:(@_:N -> @_:N -> Bool) -> @-gt:(@_:N -> @_:N -> Bool) -> @-abs:(@_:N -> N) -> @-le:(@_:N -> @_:N -> Bool) -> @state:Rvi<N> -> @+price:N -> Pair(Rvi<N>, Maybe<&2, N>)
template rvir.init source · line 73 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-div:(@_:N -> @_:N -> N) -> @+period:U32 -> @+deviation_period:U32 -> @+depth:Nat -> Rvir<N>
template rvir.emit source · line 76 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @highr:Pair(Rvi<N>, Maybe<&2, N>) -> @lowr:Pair(Rvi<N>, Maybe<&2, N>) -> Pair(Rvir<N>, Maybe<&2, N>)
template rvir.next source · line 81 · raw
@-N:Data -> @-from:(@_:U32 -> N) -> @-add:(@_:N -> @_:N -> N) -> @-sub:(@_:N -> @_:N -> N) -> @-mul:(@_:N -> @_:N -> N) -> @-div:(@_:N -> @_:N -> N) -> @-sqrt:(@_:N -> N) -> @-eq:(@_:N -> @_:N -> Bool) -> @-gt:(@_:N -> @_:N -> Bool) -> @-abs:(@_:N -> N) -> @-le:(@_:N -> @_:N -> Bool) -> @state:Rvir<N> -> @bar:0xbb55196063fb99add8900a97dfe6ee2d/src/core/bar.HL<N> -> Pair(Rvir<N>, Maybe<&2, N>)