Class MidPrice
- Namespace
- FinanceSharp.Indicators
- Assembly
- FinanceSharp.dll
This indicator computes the MidPrice (MIDPRICE). The MidPrice is calculated using the following formula: MIDPRICE = (Highest High + Lowest Low) / 2
public class MidPrice : BarIndicator, IIndicator, IUpdatable
- Inheritance
-
MidPrice
- Implements
- Inherited Members
- Extension Methods
Constructors
MidPrice(int)
Initializes a new instance of the MidPrice class using the specified period.
public MidPrice(int period)
Parameters
periodintThe period of the MIDPRICE
MidPrice(string, int)
Initializes a new instance of the MidPrice class using the specified name and period.
public MidPrice(string name, int period)
Parameters
Properties
IsReady
Gets a flag indicating when this indicator is ready and fully initialized
public override bool IsReady { get; }
Property Value
WarmUpPeriod
Required period, in data points, for the indicator to be ready and fully initialized.
public override int WarmUpPeriod { get; }
Property Value
Methods
Forward(long, DoubleArray)
Computes the next value of this indicator from the given state
protected override DoubleArray Forward(long time, DoubleArray input)
Parameters
timelonginputDoubleArrayThe input given to the indicator
Returns
- DoubleArray
A new value for this indicator