Struct yata::indicators::CoppockCurve[][src]

pub struct CoppockCurve {
    pub period1: PeriodType,
    pub period2: PeriodType,
    pub period3: PeriodType,
    pub s2_left: PeriodType,
    pub s2_right: PeriodType,
    pub s3_period: PeriodType,
    pub source: Source,
    pub method1: RegularMethods,
    pub method2: RegularMethods,
}
Expand description

Coppock curve

2 values

  • Main value

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

  • Signal line value

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

3 signals

  • Signal 1 appears when main value crosses zero line. When main value crosses zero line upwards, returns full buy signal. When main value crosses zero line downwards, returns full sell signal.
  • Signal 2 appears on reverse points of main value. When top reverse point appears,
  • Signal 3 appears on main value crosses signal line. When main value crosses signal line upwards, returns full buy signal. When main value crosses signal line downwards, returns full sell signal.

Fields

period1: PeriodType

MA period (using method1). Default is 10.

Range in [2; PeriodType::MAX).

period2: PeriodType

Long rate of change period. Default is 14.

Range in (period3; PeriodType::MAX).

period3: PeriodType

Short rate of change period. Default is 11.

Range in [1; period2).

s2_left: PeriodType

Signal 2 reverse points left limit. Default is 4.

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

s2_right: PeriodType

Signal 2 reverse points right limit. Default is 2

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

s3_period: PeriodType

Signal line period (using method2). Default is 5.

Range in [2; PeriodType::MAX).

source: Source

Source type. Default is Close.

method1: RegularMethods

Main MA type (using period1). Default is WMA

method2: RegularMethods

Signal line MA type (using s3_period). Default is EMA

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.