C# Class Encog.App.Quant.Util.BarBuffer

Mostrar archivo Open project: encog/encog-silverlight-core

Public Methods

Method Description
Add ( double d ) : void

Add a bar.

Average ( int idx ) : double

Average all of the bars.

AverageGain ( int idx ) : double

Get the average gain.

AverageLoss ( int idx ) : double

Get the average loss.

BarBuffer ( int thePeriods ) : System

Construct the object.

Max ( int idx ) : double

Get the max for the specified index.

Min ( int idx ) : double

Get the min for the specified index.

Pop ( ) : double[]

Pop (and remove) the oldest bar in the buffer.

Method Details

Add() public method

Add a bar.
public Add ( double d ) : void
d double The bar data.
return void

Average() public method

Average all of the bars.
public Average ( int idx ) : double
idx int The bar index to average.
return double

AverageGain() public method

Get the average gain.
public AverageGain ( int idx ) : double
idx int The field to get the average gain for.
return double

AverageLoss() public method

Get the average loss.
public AverageLoss ( int idx ) : double
idx int The index to check for.
return double

BarBuffer() public method

Construct the object.
public BarBuffer ( int thePeriods ) : System
thePeriods int The number of periods.
return System

Max() public method

Get the max for the specified index.
public Max ( int idx ) : double
idx int The index to check.
return double

Min() public method

Get the min for the specified index.
public Min ( int idx ) : double
idx int The index to check.
return double

Pop() public method

Pop (and remove) the oldest bar in the buffer.
public Pop ( ) : double[]
return double[]