Struct yata::indicators::Envelopes[][src]

pub struct Envelopes {
    pub period: PeriodType,
    pub k: ValueType,
    pub method: RegularMethods,
    pub source: Source,
    pub source2: Source,
}
Expand description

Envelopes

3 values

  • Upper bound

Range of values is the same as the range of the source values.

  • Lower bound

Range of values is the same as the range of the source values.Action

  • Raw Source2 value

1 signal

  • Signal 1 appears when Source2 value crosses bounds. When Source2 value crosses upper bound upwards, returns full sell signal. When Source2 value crosses lower bound downwards, returns full buy signal.

Fields

period: PeriodType

MA period length. Default is 20.

Range in [2; PeriodType::MAX).

k: ValueType

Bound relative size. Default is 0.1.

Range in (0.0; +inf).

method: RegularMethods

MA method. Default is SMA.

source: Source

Source value type for bounds. Default is Close.

source2: Source

Source2 value type for actual price. 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)

recently added

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.