Struct yata::indicators::AwesomeOscillator[][src]

pub struct AwesomeOscillator<M: MovingAverageConstructor = MA> {
    pub ma1: M,
    pub ma2: M,
    pub source: Source,
    pub left: PeriodType,
    pub right: PeriodType,
    pub conseq_peaks: u8,
}
Expand description

Awesome Oscillator

1 value

  • Absolute difference between fast and slow periods MA

Range in (-inf; +inf)

2 signals

  • “Twin Peaks”. When value is below zero line and we got conseq_peaks lower peaks, then returns full positive signal When value is above zero line and we got conseq_peaks higher peaks, then returns full negative signal. Otherwise gives no signal.
  • Gives signal when values crosses zero line

Fields

ma1: M

Default is SMA(34)

Period range in (ma2’s period; PeriodType::MAX).

ma2: M

Default is SMA(5)

Period range in [3; ma1’s period).

source: Source

Default is HL2.

left: PeriodType

Default is 1.

Range in [1; PeriodType::MAX-right).

right: PeriodType

Default is 1.

Range in [1; PeriodType::MAX-left).

conseq_peaks: u8

Default is 2.

Range in [1; PeriodType::MAX].

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.