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
Side
Gets the current side.
public PositionSide Side { get; }
Property Value
Threshold
Gets/sets the threshold used to determine when a filtered wave is complete.
public double Threshold { get; set; }
Property Value
Methods
Add(DateTime, double)
Adds the specified date and value using the default threshold.
public void Add(DateTime date, double value)
Parameters
Add(DateTime, double, double)
Adds the specified date and value using the specified threshold.
public void Add(DateTime date, double value, double threshold)
Parameters
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
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
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