cdl_doji#

cdl_doji(open_, high, low, close, length=None, factor=None, scalar=None, asint=True, offset=None, **kwargs)[source]#

Candle Type: Doji

A candle body is Doji, when it’s shorter than 10% of the average of the 10 previous candles’ high-low range.

Sources:

TA-Lib: 96.56% Correlation

Calculation:
Default values:

length=10, percent=10 (0.1), scalar=100

ABS = Absolute Value SMA = Simple Moving Average

BODY = ABS(close - open) HL_RANGE = ABS(high - low)

DOJI = scalar IF BODY < 0.01 * percent * SMA(HL_RANGE, length) ELSE 0

Args:

open_ (pd.Series): Series of ‘open’s high (pd.Series): Series of ‘high’s low (pd.Series): Series of ‘low’s close (pd.Series): Series of ‘close’s length (int): The period. Default: 10 factor (float): Doji value. Default: 100 scalar (float): How much to magnify. Default: 100 asint (bool): Keep results numerical instead of boolean. Default: True

Kwargs:
naive (bool, optional): If True, prefills potential Doji less than

the length if less than a percentage of it’s high-low range. Default: False

fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method

Returns:

pd.Series: CDL_DOJI column.