Table of Contents

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

name string

The name of this indicator

period int

The number of data points to hold in the window

Properties

InputProperties

The number of properties of input argument of Update(long, DoubleArray) must have.

public override int InputProperties { get; }

Property Value

int

Properties

The number of properties Current will have.

public override int Properties { get; }

Property Value

int

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

int

Methods

GetCandleAverage(CandleSettingType, double, DoubleArray)

Returns the average range of the previous candles

protected static double GetCandleAverage(CandleSettingType type, double sum, DoubleArray tradeBar)

Parameters

type CandleSettingType

The type of setting to use

sum double

The sum of the previous candles ranges

tradeBar DoubleArray

The input candle

Returns

double

GetCandleColor(DoubleArray)

Returns the candle color of a candle

protected static CandleColor GetCandleColor(DoubleArray tradeBar)

Parameters

tradeBar DoubleArray

The input candle

Returns

CandleColor

GetCandleGapDown(DoubleArray, DoubleArray)

Returns true if the candle is lower than the previous one

protected static bool GetCandleGapDown(DoubleArray tradeBar, DoubleArray previousBar)

Parameters

tradeBar DoubleArray
previousBar DoubleArray

Returns

bool

GetCandleGapUp(DoubleArray, DoubleArray)

Returns true if the candle is higher than the previous one

protected static bool GetCandleGapUp(DoubleArray tradeBar, DoubleArray previousBar)

Parameters

tradeBar DoubleArray
previousBar DoubleArray

Returns

bool

GetCandleRange(CandleSettingType, DoubleArray)

Returns the range of a candle

protected static double GetCandleRange(CandleSettingType type, DoubleArray tradeBar)

Parameters

type CandleSettingType

The type of setting to use

tradeBar DoubleArray

The input candle

Returns

double

GetHighLowRange(DoubleArray)

Returns the full range of the candle

protected static double GetHighLowRange(DoubleArray tradeBar)

Parameters

tradeBar DoubleArray

The input candle

Returns

double

GetLowerShadow(DoubleArray)

Returns the range of the candle's lower shadow

protected static double GetLowerShadow(DoubleArray tradeBar)

Parameters

tradeBar DoubleArray

The input candle

Returns

double

GetRealBody(DoubleArray)

Returns the distance between the close and the open of a candle

protected static double GetRealBody(DoubleArray tradeBar)

Parameters

tradeBar DoubleArray

The input candle

Returns

double

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

tradeBar DoubleArray
previousBar DoubleArray

Returns

bool

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

tradeBar DoubleArray
previousBar DoubleArray

Returns

bool

GetUpperShadow(DoubleArray)

Returns the range of the candle's upper shadow

protected static double GetUpperShadow(DoubleArray tradeBar)

Parameters

tradeBar DoubleArray

The input candle

Returns

double