Table of Contents

Struct CombinedIndicator<TLeft, TRight, TSample, TL, TR, TResult>

Namespace
Virtufin.Core.Behaviour
Assembly
Virtufin.Core.dll

Result of Combine<TLeft, TRight, TSample, TL, TR, TResult>(IIndicator<TLeft, TSample, TL>, IIndicator<TRight, TSample, TR>, Func<TL, TR, TResult>). Wraps two source indicators sharing a sample type, fanning each incoming sample to both and deriving a value from their current values.

public readonly struct CombinedIndicator<TLeft, TRight, TSample, TL, TR, TResult> : IIndicator<CombinedIndicator<TLeft, TRight, TSample, TL, TR, TResult>, TSample, TResult>, ISignal<TResult> where TLeft : IIndicator<TLeft, TSample, TL> where TRight : IIndicator<TRight, TSample, TR>

Type Parameters

TLeft

The left wrapped indicator's concrete type.

TRight

The right wrapped indicator's concrete type.

TSample

The sample type consumed on each observation.

TL

The left indicator's value type.

TR

The right indicator's value type.

TResult

This indicator's value type.

Implements
IIndicator<CombinedIndicator<TLeft, TRight, TSample, TL, TR, TResult>, TSample, TResult>
ISignal<TResult>
Inherited Members
Extension Methods

Properties

Value

The current signal value.

public TResult Value { get; }

Property Value

TResult

Methods

Add(TSample)

Fold one more sample in, returning the updated indicator.

public CombinedIndicator<TLeft, TRight, TSample, TL, TR, TResult> Add(TSample sample)

Parameters

sample TSample

The new observation.

Returns

CombinedIndicator<TLeft, TRight, TSample, TL, TR, TResult>

A new indicator instance reflecting sample.