Class CandlestickPattern
- Namespace
- FinanceSharp.Indicators.CandlestickPatterns
- Assembly
- FinanceSharp.dll
Abstract base class for a candlestick pattern indicator
public abstract class CandlestickPattern : WindowIndicator, IIndicator, IUpdatable
- Inheritance
-
CandlestickPattern
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
CandlestickPattern(string, int)
Creates a new CandlestickPattern with the specified name
protected CandlestickPattern(string name, int period)
Parameters
Properties
InputProperties
The number of properties of input argument of Update(long, DoubleArray) must have.
public override int InputProperties { get; }
Property Value
Properties
The number of properties Current will have.
public override int Properties { get; }
Property Value
WarmUpPeriod
Required period, in data points (number of updates), for the indicator to be ready and fully initialized.
public override int WarmUpPeriod { get; }
Property Value
Methods
GetCandleAverage(CandleSettingType, double, DoubleArray)
Returns the average range of the previous candles
protected static double GetCandleAverage(CandleSettingType type, double sum, DoubleArray tradeBar)
Parameters
typeCandleSettingTypeThe type of setting to use
sumdoubleThe sum of the previous candles ranges
tradeBarDoubleArrayThe input candle
Returns
GetCandleColor(DoubleArray)
Returns the candle color of a candle
protected static CandleColor GetCandleColor(DoubleArray tradeBar)
Parameters
tradeBarDoubleArrayThe input candle
Returns
GetCandleGapDown(DoubleArray, DoubleArray)
Returns true if the candle is lower than the previous one
protected static bool GetCandleGapDown(DoubleArray tradeBar, DoubleArray previousBar)
Parameters
tradeBarDoubleArraypreviousBarDoubleArray
Returns
GetCandleGapUp(DoubleArray, DoubleArray)
Returns true if the candle is higher than the previous one
protected static bool GetCandleGapUp(DoubleArray tradeBar, DoubleArray previousBar)
Parameters
tradeBarDoubleArraypreviousBarDoubleArray
Returns
GetCandleRange(CandleSettingType, DoubleArray)
Returns the range of a candle
protected static double GetCandleRange(CandleSettingType type, DoubleArray tradeBar)
Parameters
typeCandleSettingTypeThe type of setting to use
tradeBarDoubleArrayThe input candle
Returns
GetHighLowRange(DoubleArray)
Returns the full range of the candle
protected static double GetHighLowRange(DoubleArray tradeBar)
Parameters
tradeBarDoubleArrayThe input candle
Returns
GetLowerShadow(DoubleArray)
Returns the range of the candle's lower shadow
protected static double GetLowerShadow(DoubleArray tradeBar)
Parameters
tradeBarDoubleArrayThe input candle
Returns
GetRealBody(DoubleArray)
Returns the distance between the close and the open of a candle
protected static double GetRealBody(DoubleArray tradeBar)
Parameters
tradeBarDoubleArrayThe input candle
Returns
GetRealBodyGapDown(DoubleArray, DoubleArray)
Returns true if the candle is lower than the previous one (with no body overlap)
protected static bool GetRealBodyGapDown(DoubleArray tradeBar, DoubleArray previousBar)
Parameters
tradeBarDoubleArraypreviousBarDoubleArray
Returns
GetRealBodyGapUp(DoubleArray, DoubleArray)
Returns true if the candle is higher than the previous one (with no body overlap)
protected static bool GetRealBodyGapUp(DoubleArray tradeBar, DoubleArray previousBar)
Parameters
tradeBarDoubleArraypreviousBarDoubleArray
Returns
GetUpperShadow(DoubleArray)
Returns the range of the candle's upper shadow
protected static double GetUpperShadow(DoubleArray tradeBar)
Parameters
tradeBarDoubleArrayThe input candle