Struct yata::indicators::Kaufman
source · [−]pub struct Kaufman {
pub period1: PeriodType,
pub period2: PeriodType,
pub period3: PeriodType,
pub filter_period: PeriodType,
pub square_smooth: bool,
pub k: ValueType,
pub source: Source,
}
Expand description
Kaufman Adaptive Moving Average (KAMA)
Links
- https://corporatefinanceinstitute.com/resources/knowledge/trading-investing/kaufmans-adaptive-moving-average-kama/
- https://ru.wikipedia.org/wiki/%D0%90%D0%B4%D0%B0%D0%BF%D1%82%D0%B8%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D0%BA%D0%BE%D0%BB%D1%8C%D0%B7%D1%8F%D1%89%D0%B0%D1%8F_%D1%81%D1%80%D0%B5%D0%B4%D0%BD%D1%8F%D1%8F_%D0%9A%D0%B0%D1%83%D1%84%D0%BC%D0%B0%D0%BD%D0%B0
- https://www.marketvolume.com/technicalanalysis/kama.asp
1 value
KAMA
value
Range of KAMA
values is the same as the range of the source
values.
1 signal
-
if
filter_period
is less or equal than0
, then returns signal whenKAMA
crossessource
value. Whensource
crossesKAMA
upwards, returns full buy signal. Whensource
crossesKAMA
downwards, returns full sell signal. Otherwise returns no signal. -
if
filter_period
is greater than1
, it uses same cross betweensource
andKAMA
, but with additional filtering using standard deviation.
Fields
period1: PeriodType
Volatility calculation period. Default is 10
.
Range in [1
; PeriodType::MAX
).
period2: PeriodType
Fast period. Default is 2
.
Range in [1
; period3
).
period3: PeriodType
Slow period. Default is 30
.
Range in (period2
; PeriodType::MAX
).
filter_period: PeriodType
Filter period. Default is 10
.
Range in [0
; PeriodType::MAX
)
square_smooth: bool
Apply double smoothing. Default is true
.
k: ValueType
Standard deviation multiplier. Default is 0.3
.
Range in (0.0
; +inf
)
source: Source
Source type. Default is Close
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
type Instance = KaufmanInstance
type Instance = KaufmanInstance
Type of State
Initializes the State based on current Configuration
Dynamically sets Configuration parameters
Returns an IndicatorResult
size processing by the indicator (count of raw values, count of signals)
Creates an IndicatorInstance
function from this IndicatorConfig
.
Auto Trait Implementations
impl RefUnwindSafe for Kaufman
impl UnwindSafe for Kaufman
Blanket Implementations
Mutably borrows from an owned value. Read more