Lean  $LEAN_TAG$
QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern Class Reference

Abstract base class for a candlestick pattern indicator More...

Inheritance diagram for QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern:
[legend]

Protected Member Functions

 CandlestickPattern (string name, int period)
 Creates a new CandlestickPattern with the specified name More...
 
- Protected Member Functions inherited from QuantConnect.Indicators.WindowIndicator< IBaseDataBar >
 WindowIndicator (string name, int period)
 Initializes a new instance of the WindowIndicator class More...
 
override decimal ComputeNextValue (T input)
 Computes the next value of this indicator from the given state More...
 
abstract decimal ComputeNextValue (IReadOnlyWindow< T > window, T input)
 Computes the next value for this indicator from the given state. More...
 

Static Protected Member Functions

static CandleColor GetCandleColor (IBaseDataBar tradeBar)
 Returns the candle color of a candle More...
 
static decimal GetRealBody (IBaseDataBar tradeBar)
 Returns the distance between the close and the open of a candle More...
 
static decimal GetHighLowRange (IBaseDataBar tradeBar)
 Returns the full range of the candle More...
 
static decimal GetCandleRange (CandleSettingType type, IBaseDataBar tradeBar)
 Returns the range of a candle More...
 
static bool GetCandleGapUp (IBaseDataBar tradeBar, IBaseDataBar previousBar)
 Returns true if the candle is higher than the previous one More...
 
static bool GetCandleGapDown (IBaseDataBar tradeBar, IBaseDataBar previousBar)
 Returns true if the candle is lower than the previous one More...
 
static bool GetRealBodyGapUp (IBaseDataBar tradeBar, IBaseDataBar previousBar)
 Returns true if the candle is higher than the previous one (with no body overlap) More...
 
static bool GetRealBodyGapDown (IBaseDataBar tradeBar, IBaseDataBar previousBar)
 Returns true if the candle is lower than the previous one (with no body overlap) More...
 
static decimal GetLowerShadow (IBaseDataBar tradeBar)
 Returns the range of the candle's lower shadow More...
 
static decimal GetUpperShadow (IBaseDataBar tradeBar)
 Returns the range of the candle's upper shadow More...
 
static decimal GetCandleAverage (CandleSettingType type, decimal sum, IBaseDataBar tradeBar)
 Returns the average range of the previous candles More...
 

Additional Inherited Members

- Public Member Functions inherited from QuantConnect.Indicators.WindowIndicator< IBaseDataBar >
override void Reset ()
 Resets this indicator to its initial state More...
 
- Public Attributes inherited from QuantConnect.Indicators.WindowIndicator< IBaseDataBar >
int Period
 Gets the period of this window indicator More...
 
override bool IsReady
 Gets a flag indicating when this indicator is ready and fully initialized More...
 
virtual int WarmUpPeriod
 Required period, in data points, to the indicator to be ready and fully initialized More...
 

Detailed Description

Abstract base class for a candlestick pattern indicator

Definition at line 24 of file CandlestickPattern.cs.

Constructor & Destructor Documentation

◆ CandlestickPattern()

QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern.CandlestickPattern ( string  name,
int  period 
)
protected

Creates a new CandlestickPattern with the specified name

Parameters
nameThe name of this indicator
periodThe number of data points to hold in the window

Definition at line 31 of file CandlestickPattern.cs.

Member Function Documentation

◆ GetCandleColor()

static CandleColor QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern.GetCandleColor ( IBaseDataBar  tradeBar)
staticprotected

Returns the candle color of a candle

Parameters
tradeBarThe input candle

Definition at line 40 of file CandlestickPattern.cs.

Here is the caller graph for this function:

◆ GetRealBody()

static decimal QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern.GetRealBody ( IBaseDataBar  tradeBar)
staticprotected

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

Parameters
tradeBarThe input candle

Definition at line 49 of file CandlestickPattern.cs.

Here is the caller graph for this function:

◆ GetHighLowRange()

static decimal QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern.GetHighLowRange ( IBaseDataBar  tradeBar)
staticprotected

Returns the full range of the candle

Parameters
tradeBarThe input candle

Definition at line 58 of file CandlestickPattern.cs.

Here is the caller graph for this function:

◆ GetCandleRange()

static decimal QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern.GetCandleRange ( CandleSettingType  type,
IBaseDataBar  tradeBar 
)
staticprotected

Returns the range of a candle

Parameters
typeThe type of setting to use
tradeBarThe input candle

Definition at line 68 of file CandlestickPattern.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCandleGapUp()

static bool QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern.GetCandleGapUp ( IBaseDataBar  tradeBar,
IBaseDataBar  previousBar 
)
staticprotected

Returns true if the candle is higher than the previous one

Definition at line 89 of file CandlestickPattern.cs.

Here is the caller graph for this function:

◆ GetCandleGapDown()

static bool QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern.GetCandleGapDown ( IBaseDataBar  tradeBar,
IBaseDataBar  previousBar 
)
staticprotected

Returns true if the candle is lower than the previous one

Definition at line 97 of file CandlestickPattern.cs.

Here is the caller graph for this function:

◆ GetRealBodyGapUp()

static bool QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern.GetRealBodyGapUp ( IBaseDataBar  tradeBar,
IBaseDataBar  previousBar 
)
staticprotected

Returns true if the candle is higher than the previous one (with no body overlap)

Definition at line 105 of file CandlestickPattern.cs.

Here is the caller graph for this function:

◆ GetRealBodyGapDown()

static bool QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern.GetRealBodyGapDown ( IBaseDataBar  tradeBar,
IBaseDataBar  previousBar 
)
staticprotected

Returns true if the candle is lower than the previous one (with no body overlap)

Definition at line 113 of file CandlestickPattern.cs.

Here is the caller graph for this function:

◆ GetLowerShadow()

static decimal QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern.GetLowerShadow ( IBaseDataBar  tradeBar)
staticprotected

Returns the range of the candle's lower shadow

Parameters
tradeBarThe input candle

Definition at line 122 of file CandlestickPattern.cs.

Here is the caller graph for this function:

◆ GetUpperShadow()

static decimal QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern.GetUpperShadow ( IBaseDataBar  tradeBar)
staticprotected

Returns the range of the candle's upper shadow

Parameters
tradeBarThe input candle

Definition at line 131 of file CandlestickPattern.cs.

Here is the caller graph for this function:

◆ GetCandleAverage()

static decimal QuantConnect.Indicators.CandlestickPatterns.CandlestickPattern.GetCandleAverage ( CandleSettingType  type,
decimal  sum,
IBaseDataBar  tradeBar 
)
staticprotected

Returns the average range of the previous candles

Parameters
typeThe type of setting to use
sumThe sum of the previous candles ranges
tradeBarThe input candle

Definition at line 142 of file CandlestickPattern.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: