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)

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 than 0, then returns signal when KAMA crosses source value. When source crosses KAMA upwards, returns full buy signal. When source crosses KAMA downwards, returns full sell signal. Otherwise returns no signal.

  • if filter_period is greater than 1, it uses same cross between source and KAMA, 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Type of State

Name of an indicator

Initializes the State based on current Configuration

Validates if Configuration is OK

Dynamically sets Configuration parameters

Returns an IndicatorResult size processing by the indicator (count of raw values, count of signals)

Returns a name of the indicator

Creates an IndicatorInstance function from this IndicatorConfig.

Evaluates indicator config over sequence of OHLC and returns sequence of IndicatorResults Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.