Table of Contents

Class FilteredWaveGenerator

Namespace
Balsam
Assembly
Balsam.Backtester.dll

Generates filtered waves (aka zig-zag indicator) in real-time as data is added.

public class FilteredWaveGenerator
Inheritance
FilteredWaveGenerator
Inherited Members
Extension Methods

Constructors

FilteredWaveGenerator()

Instantiates a new FilteredWave Generator with a zero threshold.

public FilteredWaveGenerator()

FilteredWaveGenerator(double)

Instantiates a new FilteredWave Generator with the specified threshold.

public FilteredWaveGenerator(double threshold)

Parameters

threshold double

Properties

LastDate

Gets the last date added.

public DateTime LastDate { get; }

Property Value

DateTime

Side

Gets the current side.

public PositionSide Side { get; }

Property Value

PositionSide

Threshold

Gets/sets the threshold used to determine when a filtered wave is complete.

public double Threshold { get; set; }

Property Value

double

Methods

Add(DateTime, double)

Adds the specified date and value using the default threshold.

public void Add(DateTime date, double value)

Parameters

date DateTime
value double

Add(DateTime, double, double)

Adds the specified date and value using the specified threshold.

public void Add(DateTime date, double value, double threshold)

Parameters

date DateTime
value double
threshold double

Add(int, DateTime, double)

Adds the specified index, date, and value using the default threshold.

public void Add(int index, DateTime date, double value)

Parameters

index int
date DateTime
value double

Add(int, DateTime, double, double)

Adds the specified index, date, and value using the specified threshold.

public void Add(int index, DateTime date, double value, double threshold)

Parameters

index int
date DateTime
value double
threshold double

OnWaveCompleted(FilteredWave)

Raises a WaveCompleted event to any listeners.

protected virtual void OnWaveCompleted(FilteredWave wave)

Parameters

wave FilteredWave

Reset()

Resets the internal state.

public void Reset()

Events

WaveCompleted

Raised when a wave is completed.

public event EventHandler<FilteredWave> WaveCompleted

Event Type

EventHandler<FilteredWave>