Struct yata::indicators::IchimokuCloud[][src]

pub struct IchimokuCloud {
    pub l1: PeriodType,
    pub l2: PeriodType,
    pub l3: PeriodType,
    pub m: PeriodType,
    pub source: Source,
}
Expand description

Ichimoku cloud

4 values

  • Tenkan Sen
  • Kijun Sen
  • Senkou Span A
  • Senkou Span B

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

2 signals

  • When Tenkan Sen crosses Kijun Sen upwards and source value is greter than both Senkou Span A and B and when Senkou Span A is greter than Senkou Span B, returns full buy signal. When Tenkan Sen crosses Kijun Sen downwards and source value is lower than both Senkou Span A and B and when Senkou Span A is lower than Senkou Span B, returns full sell signal.

  • When source value crosses Kijun Sen upwards and source value is greter than both Senkou Span A and B and when Senkou Span A is greter than Senkou Span B, returns full buy signal. When source value crosses Kijun Sen downwards and source value is lower than both Senkou Span A and B and when Senkou Span A is lower than Senkou Span B, returns full sell signal.

Fields

l1: PeriodType

Tenkan Sen period. Default is 9.

Range in [1; l2).

l2: PeriodType

Kijun Sen period. Default is 26.

Range in (l1; l3).

l3: PeriodType

Senkou Span B period. Default is 52.

Range in (l2; PeriodType::MAX).

m: PeriodType

Move Senkou Span A and B forward by this period. Default is 26.

Range in [1; PeriodType::MAX).

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.