13 形态识别(Pattern Recognition Functions)

Pattern Recognition Functions 形态识别函数

反转形态

CDLHAMMER - Hammer

函数名:CDLHAMMER
名称:Hammer 锤子线
简介: 属于反转形态

  1. 实体较小
  2. 下影线较长 , 通常是实体的2倍或以上
  3. 没有或者上影线较小
  4. 实体在上一根蜡烛低点之下或附近

注意锤子线在下降趋势才有意义,出现锤子线也不一定意味着反转形态成立,需要等待其他信号验证。调用传参时,需要连续一段k线数据才可以计算出结果

返回 100 成立

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 * Must have:
 * - small real body
 * - long lower shadow
 * - no, or very short, upper shadow
 * - body below or near the lows of the previous candle
 * The meaning of "short", "long" and "near the lows" is specified with TA_SetCandleSettings;
 * outInteger is positive (1 to 100): hammer is always bullish;
 * the user should consider that a hammer must appear in a downtrend, while this function does not consider it
 */
1
integer = CDLHAMMER(open, high, low, close)

CDLHANGINGMAN - Hanging Man

函数名:CDLHANGINGMAN
名称:Hanging Man 上吊线
简介:属于反转形态

1. 实体较小   
2. 下影线较长 , 通常是实体的2倍或以上  
3. 没有或者上影线较小  
4. 实体在上一根蜡烛高点之上或附近  

注意锤子线在上升趋势才有意义,出现上吊线也不一定意味着反转形态成立,需要等待其他信号验证。
调用传参时,需要连续一段k线数据才可以计算出结果

返回 -100 成立

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 * Must have:
 * - small real body
 * - long lower shadow
 * - no, or very short, upper shadow
 * - body above or near the highs of the previous candle
 * The meaning of "short", "long" and "near the highs" is specified with TA_SetCandleSettings;
 * outInteger is negative (-1 to -100): hanging man is always bearish;
 * the user should consider that a hanging man must appear in an uptrend, while this function does not consider it
 */
1
integer = CDLHANGINGMAN(open, high, low, close)

CDLENGULFING - Engulfing Pattern

函数名:CDLENGULFING
名称:Engulfing Pattern 吞没形体(包线形态)
简介:属于反转形态

  1. 第一个k线: 白 (黑) 实体
  2. 第一个k线: 黑 (白) 实体,和第一根颜色相反,并且吞没第一根的实体
  • outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish;

吞没形体(包线形态)在明确的趋势下有意义,出现吞没形体(包线形态)也不一定意味着反转形态成立,需要等待其他信号验证。调用传参时,需要连续一段k线数据才可以计算出结果

返回 100 看涨,返回**-100** 看跌

1
2
3
4
5
6
7
8
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first: black (white) real body
 * - second: white (black) real body that engulfs the prior real body
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish;
 * the user should consider that an engulfing must appear in a downtrend if bullish or in an uptrend if bearish,
 * while this function does not consider it
 */
1
integer = CDLENGULFING(open, high, low, close)

CDLDARKCLOUDCOVER - Dark Cloud Cover

函数名:CDLDARKCLOUDCOVER
名称:Dark Cloud Cover 乌云盖顶形态(乌云线形态)
简介:属于反转形态

  1. 第一根K线: 长白线
  2. 第二根K线: 黑线在前一天最高点之上开市,而收市深扎入前一根K线白线实体内(一般50%以上)

乌云盖顶形态需要出现在明确的上升趋势中才有意义,乌云盖顶形态也不一定意味着反转形态成立,需要等待其他信号验证。调用传参时,需要连续一段k线数据才可以计算出结果

返回 -1 到 -100,表示看跌的程度,0表示不符合该形态。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long white candle
 * - second candle: black candle that opens above previous day high and closes within previous day real body; 
 * Greg Morris wants the close to be below the midpoint of the previous real body
 * The meaning of "long" is specified with TA_SetCandleSettings, the penetration of the first real body is specified
 * with optInPenetration
 * outInteger is negative (-1 to -100): dark cloud cover is always bearish
 * the user should consider that a dark cloud cover is significant when it appears in an uptrend, while 
 * this function does not consider it
 */
1
integer = CDLDARKCLOUDCOVER(open, high, low, close, penetration=0)

CDLPIERCING - Piercing Pattern

函数名:CDLPIERCING
名称:Piercing Pattern 刺透形态(斩回线形态) – 和乌云盖顶相反的形态
简介:属于反转形态

  1. 第一根K线: 长黑线
  2. 第二根K线: 长白线,在前一天最低点之下开市,而收市深扎入前一根K线黑线实体内(一般50%以上)

刺透形态(斩回线形态) 需要出现在明确的上升趋势中才有意义,刺透形态(斩回线形态) 也不一定意味着反转形态成立,需要等待其他信号验证。调用传参时,需要连续一段k线数据才可以计算出结果

返回 1 到 100,表示看涨的程度,0表示不符合该形态。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long black candle
 * - second candle: long white candle with open below previous day low and close at least at 50% of previous day 
 * real body
 * The meaning of "long" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100): piercing pattern is always bullish
 * the user should consider that a piercing pattern is significant when it appears in a downtrend, while 
 * this function does not consider it
 */
1
integer = CDLPIERCING(open, high, low, close)

星线

CDLMORNINGSTAR - Morning Star

函数名:CDLMORNINGSTAR
名称:Morning Star 启明星形态(晨星)
简介:属于星线模式

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long black real body
 * - second candle: star (Short real body gapping down)
 * - third candle: white real body that moves well within the first candle's real body
 * The meaning of "short" and "long" is specified with TA_SetCandleSettings
 * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should
 * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want
 * it to be relatively long
 * outInteger is positive (1 to 100): morning star is always bullish; 
 * the user should consider that a morning star is significant when it appears in a downtrend, 
 * while this function does not consider the trend
 */
1
integer = CDLMORNINGSTAR(open, high, low, close, penetration=0)

CDLEVENINGSTAR - Evening Star

函数名:CDLEVENINGSTAR
名称:Evening Star 黄昏星形态(暮星)
简介:属于星线模式

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long white real body
 * - second candle: star (short real body gapping up)
 * - third candle: black real body that moves well within the first candle's real body
 * The meaning of "short" and "long" is specified with TA_SetCandleSettings
 * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should
 * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want
 * it to be relatively long
 * outInteger is negative (-1 to -100): evening star is always bearish; 
 * the user should consider that an evening star is significant when it appears in an uptrend, 
 * while this function does not consider the trend
 */
1
integer = CDLEVENINGSTAR(open, high, low, close, penetration=0)

CDLMORNINGDOJISTAR - Morning Doji Star

函数名:CDLMORNINGDOJISTAR
名称:Morning Doji Star 十字启明星形态(十字晨星)
简介:属于星线模式

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long black real body
 * - second candle: doji gapping down
 * - third candle: white real body that moves well within the first candle's real body
 * The meaning of "doji" and "long" is specified with TA_SetCandleSettings
 * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should
 * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want
 * it to be relatively long
 * outInteger is positive (1 to 100): morning doji star is always bullish;
 * the user should consider that a morning star is significant when it appears in a downtrend, 
 * while this function does not consider the trend
 */
1
integer = CDLMORNINGDOJISTAR(open, high, low, close, penetration=0)

CDLEVENINGDOJISTAR - Evening Doji Star

函数名:CDLEVENINGDOJISTAR
名称:Evening Doji Star 黄昏星形态(十字暮星)
简介:属于星线形态

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long white real body
 * - second candle: doji gapping up
 * - third candle: black real body that moves well within the first candle's real body
 * The meaning of "doji" and "long" is specified with TA_SetCandleSettings
 * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should
 * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want
 * it to be relatively long
 * outInteger is negative (-1 to -100): evening star is always bearish; 
 * the user should consider that an evening star is significant when it appears in an uptrend, 
 * while this function does not consider the trend
 */
1
integer = CDLEVENINGDOJISTAR(open, high, low, close, penetration=0)

CDLABANDONEDBABY - Abandoned Baby

函数名:CDLABANDONEDBABY
名称:Abandoned Baby 弃婴 – 跳空的十字星
简介:属于星线形态 比较罕见。 弃婴形态

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long white (black) real body
 * - second candle: doji
 * - third candle: black (white) real body that moves well within the first candle's real body
 * - upside (downside) gap between the first candle and the doji (the shadows of the two candles don' touch)
 * - downside (upside) gap between the doji and the third candle (the shadows of the two candles don't touch)
 * The meaning of "doji" and "long" is specified with TA_SetCandleSettings
 * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should
 * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want
 * it to be relatively long
 * outInteger is positive (1 to 100) when it's an abandoned baby bottom or negative (-1 to -100) when it's 
 * an abandoned baby top; the user should consider that an abandoned baby is significant when it appears in 
 * an uptrend or downtrend, while this function does not consider the trend
 */
1
integer = CDLABANDONEDBABY(open, high, low, close, penetration=0)

CDLSHOOTINGSTAR - Shooting Star

函数名:CDLSHOOTINGSTAR
名称:Shooting Star 流星形态
简介:属于星线模式

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 * Must have:
 * - small real body
 * - long upper shadow
 * - no, or very short, lower shadow
 * - gap up from prior real body
 * The meaning of "short", "very short" and "long" is specified with TA_SetCandleSettings;
 * outInteger is negative (-1 to -100): shooting star is always bearish;
 * the user should consider that a shooting star must appear in an uptrend, while this function does not consider it
 */
1
integer = CDLSHOOTINGSTAR(open, high, low, close)

CDLINVERTEDHAMMER - Inverted Hammer

函数名:CDLINVERTEDHAMMER
名称:Inverted Hammer 倒锤子形态
简介:属于星线模式

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 * Must have:
 * - small real body
 * - long upper shadow
 * - no, or very short, lower shadow
 * - gap down
 * The meaning of "short", "very short" and "long" is specified with TA_SetCandleSettings;
 * outInteger is positive (1 to 100): inverted hammer is always bullish;
 * the user should consider that an inverted hammer must appear in a downtrend, while this function does not consider it
 */
1
integer = CDLINVERTEDHAMMER(open, high, low, close)

其他反转形态

CDLHARAMI - Harami Pattern

函数名:CDLHARAMI
名称:Harami Pattern 孕线形态
简介:

1
2
3
4
5
6
7
8
9
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long white (black) real body
 * - second candle: short real body totally engulfed by the first
 * The meaning of "short" and "long" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; 
 * the user should consider that a harami is significant when it appears in a downtrend if bullish or 
 * in an uptrend when bearish, while this function does not consider the trend
 */
1
integer = CDLHARAMI(open, high, low, close)

CDLHARAMICROSS - Harami Cross Pattern

函数名:CDLHARAMICROSS
名称:Harami Cross Pattern 十字孕线形态
简介:

1
2
3
4
5
6
7
8
9
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long white (black) real body
 * - second candle: doji totally engulfed by the first
 * The meaning of "doji" and "long" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; 
 * the user should consider that a harami cross is significant when it appears in a downtrend if bullish or 
 * in an uptrend when bearish, while this function does not consider the trend
 */
1
integer = CDLHARAMICROSS(open, high, low, close)

CDLBELTHOLD - Belt-hold

函数名:CDLBELTHOLD
名称:Belt-hold 捉腰带线
简介:能具有看涨的意义,也可能具有看跌的意义。

捉腰带线

你未必知道的K线技术——捉腰带线

1
2
3
4
5
6
7
/* Proceed with the calculation for the requested range.
 * Must have:
 * - long white (black) real body
 * - no or very short lower (upper) shadow
 * The meaning of "long" and "very short" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish)
 */
1
integer = CDLBELTHOLD(open, high, low, close)

CDLUPSIDEGAP2CROWS - Upside Gap Two Crows

函数名:CDLUPSIDEGAP2CROWS
名称:Upside Gap Two Crows 向上跳空的两只乌鸦
简介:三日K线模式,第一日阳线,第二日跳空以高于第一日最高价开盘, 收阴线,第三日开盘价高于第二日,收阴线,与第一日比仍有缺口。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: white candle, usually long
 * - second candle: small black real body
 * - gap between the first and the second candle's real bodies
 * - third candle: black candle with a real body that engulfs the preceding candle 
 *   and closes above the white candle's close
 * The meaning of "short" and "long" is specified with TA_SetCandleSettings
 * outInteger is negative (-1 to -100): upside gap two crows is always bearish; 
 * the user should consider that an upside gap two crows is significant when it appears in an uptrend, 
 * while this function does not consider the trend
 */
1
integer = CDLUPSIDEGAP2CROWS(open, high, low, close)

CDL3BLACKCROWS - Three Black Crows

函数名:CDL3BLACKCROWS
名称:Three Black Crows 三只乌鸦
简介:三日K线模式,又称暴跌三杰,又称满天风雨谱,股价大涨后出现连续阴线,连续三根阴线,每日收盘价都下跌且接近最低价,每日开盘价都在上根K线实体内,预示股价下跌。 表明一波行情已走到尽头,巨大的获利筹码等待着套现出局。

暴跌三杰

满天风雨

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/* Proceed with the calculation for the requested range.
 * Must have:
 * - three consecutive and declining black candlesticks
 * - each candle must have no or very short lower shadow
 * - each candle after the first must open within the prior candle's real body
 * - the first candle's close should be under the prior white candle's high
 * The meaning of "very short" is specified with TA_SetCandleSettings
 * outInteger is negative (-1 to -100): three black crows is always bearish; 
 * the user should consider that 3 black crows is significant when it appears after a mature advance or at high levels, 
 * while this function does not consider it
 */
1
integer = CDL3BLACKCROWS(open, high, low, close)

CDLCOUNTERATTACK - Counterattack

函数名:CDLCOUNTERATTACK
名称:Counterattack 反击线形态(约会线形态)
简介:二日K线模式,与分离线类似。

反击线

1
2
3
4
5
6
7
8
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long black (white)
 * - second candle: long white (black) with close equal to the prior close
 * The meaning of "equal" and "long" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish;
 * the user should consider that counterattack is significant in a trend, while this function does not consider it
 */
1
integer = CDLCOUNTERATTACK(open, high, low, close)

持续形态

CDLTASUKIGAP - Tasuki Gap

函数名:CDLTASUKIGAP
名称:Tasuki Gap 向上跳空和向下跳空并列阴阳线
简介:三日K线模式,分上涨和下跌,以上升为例, 前两日阳线,第二日跳空,第三日阴线,收盘价于缺口中,上升趋势持续。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
/* Proceed with the calculation for the requested range.
 * Must have:
 * - upside (downside) gap
 * - first candle after the window: white (black) candlestick
 * - second candle: black (white) candlestick that opens within the previous real body and closes under (above)
 *   the previous real body inside the gap
 * - the size of two real bodies should be near the same
 * The meaning of "near" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish;
 * the user should consider that tasuki gap is significant when it appears in a trend, while this function does 
 * not consider it
 */
1
integer = CDLTASUKIGAP(open, high, low, close)

CDLGAPSIDESIDEWHITE - Up/Down-gap side-by-side white lines

函数名:CDLGAPSIDESIDEWHITE
名称:Up/Down-gap side-by-side white lines 跳空并列白色蜡烛线形态
简介:二日K线模式,上升趋势向上跳空,下跌趋势向下跳空, 第一日与第二日有相同开盘价,实体长度差不多,则趋势持续。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
/* Proceed with the calculation for the requested range.
 * Must have:
 * - upside or downside gap (between the bodies)
 * - first candle after the window: white candlestick
 * - second candle after the window: white candlestick with similar size (near the same) and about the same 
 *   open (equal) of the previous candle
 * - the second candle does not close the window
 * The meaning of "near" and "equal" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) or negative (-1 to -100): the user should consider that upside 
 * or downside gap side-by-side white lines is significant when it appears in a trend, while this function 
 * does not consider the trend
 */
1
integer = CDLGAPSIDESIDEWHITE(open, high, low, close)

CDLRISEFALL3METHODS - Rising/Falling Three Methods

函数名:CDLRISEFALL3METHODS 名称:Rising/Falling Three Methods 上升三法和下降三法形态
简介: 五日K线模式,以上升三法为例,上涨趋势中, 第一日长阳线,中间三日价格在第一日范围内小幅震荡, 第五日长阳线,收盘价高于第一日收盘价,预示股价上升。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long white (black) candlestick
 * - then: group of falling (rising) small real body candlesticks (commonly black (white)) that hold within 
 *   the prior long candle's range: ideally they should be three but two or more than three are ok too
 * - final candle: long white (black) candle that opens above (below) the previous small candle's close 
 *   and closes above (below) the first long candle's close
 * The meaning of "short" and "long" is specified with TA_SetCandleSettings; here only patterns with 3 small candles
 * are considered;
 * outInteger is positive (1 to 100) or negative (-1 to -100)
 */
1
integer = CDLRISEFALL3METHODS(open, high, low, close)

CDL3WHITESOLDIERS - Three Advancing White Soldiers

函数名:CDL3WHITESOLDIERS
名称:Three Advancing White Soldiers 前进白色三兵形态
简介:三日K线模式,三日K线皆阳, 每日收盘价变高且接近最高价,开盘价在前一日实体上半部,预示股价上升。

三个白兵

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
/* Proceed with the calculation for the requested range.
* Must have:
* - three white candlesticks with consecutively higher closes
* - Greg Morris wants them to be long, Steve Nison doesn't; anyway they should not be short
* - each candle opens within or near the previous white real body 
* - each candle must have no or very short upper shadow
* - to differentiate this pattern from advance block, each candle must not be far shorter than the prior candle
* The meanings of "not short", "very short shadow", "far" and "near" are specified with TA_SetCandleSettings;
* here the 3 candles must be not short, if you want them to be long use TA_SetCandleSettings on BodyShort;
* outInteger is positive (1 to 100): advancing 3 white soldiers is always bullish;
* the user should consider that 3 white soldiers is significant when it appears in downtrend, while this function 
* does not consider it
*/
1
integer = CDL3WHITESOLDIERS(open, high, low, close)

CDL3LINESTRIKE - Three-Line Strike

函数名:CDL3LINESTRIKE
名称: Three-Line Strike 三线打击
简介:四日K线模式,前三根阳线,每日收盘价都比前一日高, 开盘价在前一日实体内,第四日市场高开,收盘价低于第一日开盘价。三线打击”形态的出现不能简单地理解为将出现短线反弹,这种形态的神奇意义就在于其指示的往往都是中线涨升行情。

k线形态之三线打击

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/* Proceed with the calculation for the requested range.
 * Must have:
 * - three white soldiers (three black crows): three white (black) candlesticks with consecutively higher (lower) closes,
 * each opening within or near the previous real body
 * - fourth candle: black (white) candle that opens above (below) prior candle's close and closes below (above) 
 * the first candle's open
 * The meaning of "near" is specified with TA_SetCandleSettings;
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish;
 * the user should consider that 3-line strike is significant when it appears in a trend in the same direction of
 * the first three candles, while this function does not consider it
 */
1
integer = CDL3LINESTRIKE(open, high, low, close)

神奇的十字线

CDLDOJI - Doji

函数名:CDLDOJI
名称:Doji 十字
简介:一日K线模式,开盘价与收盘价基本相同。

1
2
3
4
5
6
7
8
/* Proceed with the calculation for the requested range.
 *
 * Must have:
 * - open quite equal to close
 * How much can be the maximum distance between open and close is specified with TA_SetCandleSettings
 * outInteger is always positive (1 to 100) but this does not mean it is bullish: doji shows uncertainty and it is
 * neither bullish nor bearish when considered alone
 */
1
integer = CDLDOJI(open, high, low, close)

CDLDOJISTAR - Doji Star

函数名:CDLDOJISTAR
名称:Doji Star 十字星
简介:一日K线模式,开盘价与收盘价基本相同,上下影线不会很长,预示着当前趋势反转。

十字星

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long real body
 * - second candle: star (open gapping up in an uptrend or down in a downtrend) with a doji
 * The meaning of "doji" and "long" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; 
 * it's defined bullish when the long candle is white and the star gaps up, bearish when the long candle 
 * is black and the star gaps down; the user should consider that a doji star is bullish when it appears 
 * in an uptrend and it's bearish when it appears in a downtrend, so to determine the bullishness or 
 * bearishness of the pattern the trend must be analyzed
 */
1
integer = CDLDOJISTAR(open, high, low, close)

CDLGRAVESTONEDOJI - Gravestone Doji

函数名:CDLGRAVESTONEDOJI
名称:Gravestone Doji 墓碑十字线
简介:一日K线模式,开盘价与收盘价相同,上影线长,无下影线,预示底部反转。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 *
 * Must have:
 * - doji body
 * - open and close at the low of the day = no or very short lower shadow
 * - upper shadow (to distinguish from other dojis, here upper shadow should not be very short)
 * The meaning of "doji" and "very short" is specified with TA_SetCandleSettings
 * outInteger is always positive (1 to 100) but this does not mean it is bullish: gravestone doji must be considered
 * relatively to the trend
 */
1
integer = CDLGRAVESTONEDOJI(open, high, low, close)

CDLDRAGONFLYDOJI - Dragonfly Doji

函数名:CDLDRAGONFLYDOJI
名称:Dragonfly Doji 蜻蜓十字/T形十字
简介:一日K线模式,开盘后价格一路走低, 之后收复,收盘价与开盘价相同,预示趋势反转。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 *
 * Must have:
 * - doji body
 * - open and close at the high of the day = no or very short upper shadow
 * - lower shadow (to distinguish from other dojis, here lower shadow should not be very short)
 * The meaning of "doji" and "very short" is specified with TA_SetCandleSettings
 * outInteger is always positive (1 to 100) but this does not mean it is bullish: dragonfly doji must be considered
 * relatively to the trend
 */
1
integer = CDLDRAGONFLYDOJI(open, high, low, close)

CDLTAKURI - Takuri (Dragonfly Doji with very long lower shadow)

函数名:CDLTAKURI
名称:Takuri (Dragonfly Doji with very long lower shadow) 探水竿
简介:一日K线模式,大致与蜻蜓十字相同,下影线长度长。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 *
 * Must have:
 * - doji body
 * - open and close at the high of the day = no or very short upper shadow
 * - very long lower shadow
 * The meaning of "doji", "very short" and "very long" is specified with TA_SetCandleSettings
 * outInteger is always positive (1 to 100) but this does not mean it is bullish: takuri must be considered
 * relatively to the trend
 */
1
integer = CDLTAKURI(open, high, low, close)

CDLLONGLEGGEDDOJI - Long Legged Doji

函数名:CDLLONGLEGGEDDOJI
名称:Long Legged Doji 长脚十字
简介:一日K线模式,开盘价与收盘价相同居当日价格中部,上下影线长, 表达市场不确定性。

1
2
3
4
5
6
7
8
/* Proceed with the calculation for the requested range.
 *
 * Must have:
 * - doji body
 * - one or two long shadows
 * The meaning of "doji" is specified with TA_SetCandleSettings
 * outInteger is always positive (1 to 100) but this does not mean it is bullish: long legged doji shows uncertainty
 */
1
integer = CDLLONGLEGGEDDOJI(open, high, low, close)

CDLRICKSHAWMAN - Rickshaw Man

函数名:CDLRICKSHAWMAN
名称:Rickshaw Man 黄包车夫
简介:一日K线模式,与长腿十字线类似, 若实体正好处于价格振幅中点,称为黄包车夫。

1
2
3
4
5
6
7
8
9
/* Proceed with the calculation for the requested range.
 *
 * Must have:
 * - doji body
 * - two long shadows
 * - body near the midpoint of the high-low range
 * The meaning of "doji" and "near" is specified with TA_SetCandleSettings
 * outInteger is always positive (1 to 100) but this does not mean it is bullish: rickshaw man shows uncertainty
 */
1
integer = CDLRICKSHAWMAN(open, high, low, close)

其他未归类

CDL2CROWS - Two Crows

函数名:CDL2CROWS
名称:Two Crows 两只乌鸦
简介:三日K线模式,第一天长阳,第二天高开收阴,留下向上跳空缺口,第三天再次高开在第二天蜡烛线实体内开盘,然后一路下滑,弥补第二天向上跳空的缺口,突破到第一天的实体部分内,继续收阴, 说明市场原有的上升趋势将出现反转,两只乌鸦形态只能预测顶部反转和熊市反转。

两只乌鸦K线形态分析

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long white candle
 * - second candle: black real body
 * - gap between the first and the second candle's real bodies
 * - third candle: black candle that opens within the second real body and closes within the first real body
 * The meaning of "long" is specified with TA_SetCandleSettings
 * outInteger is negative (-1 to -100): two crows is always bearish; 
 * the user should consider that two crows is significant when it appears in an uptrend, while this function 
 * does not consider the trend
 */
1
integer = CDL2CROWS(open, high, low, close)

CDL3INSIDE - Three Inside Up/Down

函数名:CDL3INSIDE
名称: Three Inside Up/Down 三内部上涨和下跌
简介:三日K线模式,母子信号+长K线,预示趋势的反转。

三内部上涨和下跌

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long white (black) real body
 * - second candle: short real body totally engulfed by the first
 * - third candle: black (white) candle that closes lower (higher) than the first candle's open
 * The meaning of "short" and "long" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) for the three inside up or negative (-1 to -100) for the three inside down; 
 * the user should consider that a three inside up is significant when it appears in a downtrend and a three inside
 * down is significant when it appears in an uptrend, while this function does not consider the trend
 */
1
integer = CDL3INSIDE(open, high, low, close)

CDL3OUTSIDE - Three Outside Up/Down

函数名:CDL3OUTSIDE
名称:Three Outside Up/Down 三外部上涨和下跌
简介:三日K线模式,与三内部上涨和下跌类似,K线为阴阳阳,但第一日与第二日的K线形态相反, 以三外部上涨为例,第一日K线在第二日K线内部,预示着股价上涨。

1
2
3
4
5
6
7
8
9
   /* Proceed with the calculation for the requested range.
    * Must have:
    * - first: black (white) real body
    * - second: white (black) real body that engulfs the prior real body
    * - third: candle that closes higher (lower) than the second candle
    * outInteger is positive (1 to 100) for the three outside up or negative (-1 to -100) for the three outside down;
    * the user should consider that a three outside up must appear in a downtrend and three outside down must appear
    * in an uptrend, while this function does not consider it
    */
1
integer = CDL3OUTSIDE(open, high, low, close)

CDLADVANCEBLOCK - Advance Block

函数名:CDLADVANCEBLOCK
名称:Advance Block 大敌当前
简介:三日K线模式,三日都收阳,每日收盘价都比前一日高, 开盘价都在前一日实体以内,实体变短,上影线变长。 空方力量逐步发展壮大。

大敌当前K线形态

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
/* Proceed with the calculation for the requested range.
 * Must have:
 * - three white candlesticks with consecutively higher closes
 * - each candle opens within or near the previous white real body 
 * - first candle: long white with no or very short upper shadow (a short shadow is accepted too for more flexibility)
 * - second and third candles, or only third candle, show signs of weakening: progressively smaller white real bodies 
 * and/or relatively long upper shadows; see below for specific conditions
 * The meanings of "long body", "short shadow", "far" and "near" are specified with TA_SetCandleSettings;
 * outInteger is negative (-1 to -100): advance block is always bearish;
 * the user should consider that advance block is significant when it appears in uptrend, while this function 
 * does not consider it
 */
1
integer = CDLADVANCEBLOCK(open, high, low, close)

CDL3STARSINSOUTH - Three Stars In The South

函数名:CDL3STARSINSOUTH
名称:Three Stars In The South 南方三星
简介:三日K线模式,与大敌当前相反,三日K线皆阴,第一日有长下影线, 第二日与第一日类似,K线整体小于第一日,第三日无下影线实体信号, 成交价格都在第一日振幅之内,预示下跌趋势反转,股价上升。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long black candle with long lower shadow
 * - second candle: smaller black candle that opens higher than prior close but within prior candle's range 
 *   and trades lower than prior close but not lower than prior low and closes off of its low (it has a shadow)
 * - third candle: small black marubozu (or candle with very short shadows) engulfed by prior candle's range
 * The meanings of "long body", "short body", "very short shadow" are specified with TA_SetCandleSettings;
 * outInteger is positive (1 to 100): 3 stars in the south is always bullish;
 * the user should consider that 3 stars in the south is significant when it appears in downtrend, while this function 
 * does not consider it
 */
1
integer = CDL3STARSINSOUTH(open, high, low, close)

CDLBREAKAWAY - Breakaway

函数名:CDLBREAKAWAY
名称:Breakaway 脱离
简介:五日K线模式,以看涨脱离为例,下跌趋势中,第一日长阴线,第二日跳空阴线,延续趋势开始震荡,第五日长阳线,收盘价在第一天收盘价与第二天开盘价之间,预示价格上涨。 同样也有下跌分离。

K线形态详解之分离线

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long black (white)
 * - second candle: black (white) day whose body gaps down (up)
 * - third candle: black or white day with lower (higher) high and lower (higher) low than prior candle's
 * - fourth candle: black (white) day with lower (higher) high and lower (higher) low than prior candle's
 * - fifth candle: white (black) day that closes inside the gap, erasing the prior 3 days
 * The meaning of "long" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish;
 * the user should consider that breakaway is significant in a trend opposite to the last candle, while this 
 * function does not consider it
 */
1
integer = CDLBREAKAWAY(open, high, low, close)

CDLCLOSINGMARUBOZU - Closing Marubozu

函数名:CDLCLOSINGMARUBOZU
名称:Closing Marubozu 收盘缺影线
简介:一日K线模式,以阳线为例,最低价低于开盘价,收盘价等于最高价, 预示着趋势持续。

1
2
3
4
5
6
7
/* Proceed with the calculation for the requested range.
 * Must have:
 * - long white (black) real body
 * - no or very short upper (lower) shadow
 * The meaning of "long" and "very short" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish)
 */
1
integer = CDLCLOSINGMARUBOZU(open, high, low, close)

CDLCONCEALBABYSWALL - Concealing Baby Swallow

函数名:CDLCONCEALBABYSWALL
名称: Concealing Baby Swallow 藏婴吞没
简介:四日K线模式,下跌趋势中,前两日阴线无影线,第二日开盘、收盘价皆低于第二日,第三日倒锤头,第四日开盘价高于前一日最高价,收盘价低于前一日最低价,预示着底部反转。

藏婴吞没形态的变化及简化

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: black marubozu (very short shadows)
 * - second candle: black marubozu (very short shadows)
 * - third candle: black candle that opens gapping down but has an upper shadow that extends into the prior body
 * - fourth candle: black candle that completely engulfs the third candle, including the shadows
 * The meanings of "very short shadow" are specified with TA_SetCandleSettings;
 * outInteger is positive (1 to 100): concealing baby swallow is always bullish;
 * the user should consider that concealing baby swallow is significant when it appears in downtrend, while 
 * this function does not consider it
 */
1
integer = CDLCONCEALBABYSWALL(open, high, low, close)

CDLHIGHWAVE - High-Wave Candle

函数名:CDLHIGHWAVE
名称:High-Wave Candle 风高浪大线
简介:三日K线模式,具有极长的上/下影线与短的实体,预示着趋势反转。

1
2
3
4
5
6
7
8
/* Proceed with the calculation for the requested range.
 * Must have:
 * - short real body
 * - very long upper and lower shadow
 * The meaning of "short" and "very long" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when white or negative (-1 to -100) when black;
 * it does not mean bullish or bearish
 */
1
integer = CDLHIGHWAVE(open, high, low, close)

CDLHIKKAKE - Hikkake Pattern

函数名:CDLHIKKAKE
名称:Hikkake Pattern 陷阱
简介:三日K线模式,与母子类似,第二日价格在前一日实体范围内, 第三日收盘价高于前两日,反转失败,趋势继续。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first and second candle: inside bar (2nd has lower high and higher low than 1st)
 * - third candle: lower high and lower low than 2nd (higher high and higher low than 2nd)
 * outInteger[hikkakebar] is positive (1 to 100) or negative (-1 to -100) meaning bullish or bearish hikkake
 * Confirmation could come in the next 3 days with:
 * - a day that closes higher than the high (lower than the low) of the 2nd candle
 * outInteger[confirmationbar] is equal to 100 + the bullish hikkake result or -100 - the bearish hikkake result
 * Note: if confirmation and a new hikkake come at the same bar, only the new hikkake is reported (the new hikkake
 * overwrites the confirmation of the old hikkake)
 */
1
integer = CDLHIKKAKE(open, high, low, close)

CDLHIKKAKEMOD - Modified Hikkake Pattern

函数名:CDLHIKKAKEMOD
名称:Modified Hikkake Pattern 修正陷阱
简介:三日K线模式,与陷阱类似,上升趋势中,第三日跳空高开; 下跌趋势中,第三日跳空低开,反转失败,趋势继续。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle
 * - second candle: candle with range less than first candle and close near the bottom (near the top)
 * - third candle: lower high and higher low than 2nd
 * - fourth candle: lower high and lower low (higher high and higher low) than 3rd
 * outInteger[hikkake bar] is positive (1 to 100) or negative (-1 to -100) meaning bullish or bearish hikkake
 * Confirmation could come in the next 3 days with:
 * - a day that closes higher than the high (lower than the low) of the 3rd candle
 * outInteger[confirmationbar] is equal to 100 + the bullish hikkake result or -100 - the bearish hikkake result
 * Note: if confirmation and a new hikkake come at the same bar, only the new hikkake is reported (the new hikkake
 * overwrites the confirmation of the old hikkake);
 * the user should consider that modified hikkake is a reversal pattern, while hikkake could be both a reversal 
 * or a continuation pattern, so bullish (bearish) modified hikkake is significant when appearing in a downtrend 
 * (uptrend)
 */
1
integer = CDLHIKKAKEMOD(open, high, low, close)

CDLHOMINGPIGEON - Homing Pigeon

函数名:CDLHOMINGPIGEON
名称:Homing Pigeon 家鸽
简介:二日K线模式,与母子线类似,不同的的是二日K线颜色相同, 第二日最高价、最低价都在第一日实体之内,预示着趋势反转。

1
2
3
4
5
6
7
8
9
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long black candle
 * - second candle: short black real body completely inside the previous day's body
 * The meaning of "short" and "long" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100): homing pigeon is always bullish; 
 * the user should consider that homing pigeon is significant when it appears in a downtrend,
 * while this function does not consider the trend
 */
1
integer = CDLHOMINGPIGEON(open, high, low, close)

CDLIDENTICAL3CROWS - Identical Three Crows

函数名:CDLIDENTICAL3CROWS
名称:Identical Three Crows 三胞胎乌鸦
简介:三日K线模式,上涨趋势中,三日都为阴线,长度大致相等, 每日开盘价等于前一日收盘价,收盘价接近当日最低价,预示价格下跌。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/* Proceed with the calculation for the requested range.
 * Must have:
 * - three consecutive and declining black candlesticks
 * - each candle must have no or very short lower shadow
 * - each candle after the first must open at or very close to the prior candle's close
 * The meaning of "very short" is specified with TA_SetCandleSettings;
 * the meaning of "very close" is specified with TA_SetCandleSettings (Equal);
 * outInteger is negative (-1 to -100): identical three crows is always bearish; 
 * the user should consider that identical 3 crows is significant when it appears after a mature advance or at high levels, 
 * while this function does not consider it
 */
1
integer = CDLIDENTICAL3CROWS(open, high, low, close)

CDLINNECK - In-Neck Pattern

函数名:CDLINNECK
名称:In-Neck Pattern 颈内线
简介:二日K线模式,下跌趋势中,第一日长阴线, 第二日开盘价较低,收盘价略高于第一日收盘价,阳线,实体较短,预示着下跌继续。

1
2
3
4
5
6
7
8
9
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long black candle
 * - second candle: white candle with open below previous day low and close slightly into previous day body
 * The meaning of "equal" is specified with TA_SetCandleSettings
 * outInteger is negative (-1 to -100): in-neck is always bearish
 * the user should consider that in-neck is significant when it appears in a downtrend, while this function 
 * does not consider it
 */
1
integer = CDLINNECK(open, high, low, close)

CDLKICKING - Kicking

函数名:CDLKICKING
名称:Kicking 反冲形态
简介:二日K线模式,与分离线类似,两日K线为秃线,颜色相反,存在跳空缺口。

1
2
3
4
5
6
7
8
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: marubozu
 * - second candle: opposite color marubozu
 * - gap between the two candles: upside gap if black then white, downside gap if white then black
 * The meaning of "long body" and "very short shadow" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish
 */
1
integer = CDLKICKING(open, high, low, close)

CDLKICKINGBYLENGTH - Kicking - bull/bear determined by the longer marubozu

函数名:CDLKICKINGBYLENGTH
名称:Kicking - bull/bear determined by the longer marubozu 由较长缺影线决定的反冲形态
简介:二日K线模式,与反冲形态类似,较长缺影线决定价格的涨跌。

1
2
3
4
5
6
7
8
9
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: marubozu
 * - second candle: opposite color marubozu
 * - gap between the two candles: upside gap if black then white, downside gap if white then black
 * The meaning of "long body" and "very short shadow" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; the longer of the two
 * marubozu determines the bullishness or bearishness of this pattern
 */
1
integer = CDLKICKINGBYLENGTH(open, high, low, close)

CDLLADDERBOTTOM - Ladder Bottom

函数名:CDLLADDERBOTTOM
名称:Ladder Bottom 梯底
简介:五日K线模式,下跌趋势中,前三日阴线, 开盘价与收盘价皆低于前一日开盘、收盘价,第四日倒锤头,第五日开盘价高于前一日开盘价, 阳线,收盘价高于前几日价格振幅,预示着底部反转。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 * Must have:
 * - three black candlesticks with consecutively lower opens and closes
 * - fourth candle: black candle with an upper shadow (it's supposed to be not very short)
 * - fifth candle: white candle that opens above prior candle's body and closes above prior candle's high
 * The meaning of "very short" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100): ladder bottom is always bullish; 
 * the user should consider that ladder bottom is significant when it appears in a downtrend, 
 * while this function does not consider it
 */
1
integer = CDLLADDERBOTTOM(open, high, low, close)

CDLLONGLINE - Long Line Candle

函数名:CDLLONGLINE
名称:Long Line Candle 长蜡烛
简介:一日K线模式,K线实体长,无上下影线。

1
2
3
4
5
6
7
/* Proceed with the calculation for the requested range.
 * Must have:
 * - long real body
 * - short upper and lower shadow
 * The meaning of "long" and "short" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish)
 */
1
integer = CDLLONGLINE(open, high, low, close)

CDLMARUBOZU - Marubozu

函数名:CDLMARUBOZU
名称:Marubozu 光头光脚/缺影线
简介:一日K线模式,上下两头都没有影线的实体, 阴线预示着熊市持续或者牛市反转,阳线相反。

1
2
3
4
5
6
7
/* Proceed with the calculation for the requested range.
 * Must have:
 * - long real body
 * - no or very short upper and lower shadow
 * The meaning of "long" and "very short" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish)
 */
1
integer = CDLMARUBOZU(open, high, low, close)

CDLMATCHINGLOW - Matching Low

函数名:CDLMATCHINGLOW
名称:Matching Low 相同低价
简介:二日K线模式,下跌趋势中,第一日长阴线, 第二日阴线,收盘价与前一日相同,预示底部确认,该价格为支撑位。

1
2
3
4
5
6
7
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: black candle
 * - second candle: black candle with the close equal to the previous close
 * The meaning of "equal" is specified with TA_SetCandleSettings
 * outInteger is always positive (1 to 100): matching low is always bullish;
 */
1
integer = CDLMATCHINGLOW(open, high, low, close)

CDLMATHOLD - Mat Hold

函数名:CDLMATHOLD
名称:Mat Hold 铺垫
简介:五日K线模式,上涨趋势中,第一日阳线,第二日跳空高开影线, 第三、四日短实体影线,第五日阳线,收盘价高于前四日,预示趋势持续。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long white candle
 * - upside gap between the first and the second bodies
 * - second candle: small black candle
 * - third and fourth candles: falling small real body candlesticks (commonly black) that hold within the long 
 *   white candle's body and are higher than the reaction days of the rising three methods
 * - fifth candle: white candle that opens above the previous small candle's close and closes higher than the 
 *   high of the highest reaction day
 * The meaning of "short" and "long" is specified with TA_SetCandleSettings; 
 * "hold within" means "a part of the real body must be within";
 * optInPenetration is the maximum percentage of the first white body the reaction days can penetrate (it is 
 * to specify how much the reaction days should be "higher than the reaction days of the rising three methods")
 * outInteger is positive (1 to 100): mat hold is always bullish
 */
1
integer = CDLMATHOLD(open, high, low, close, penetration=0)

CDLONNECK - On-Neck Pattern

函数名:CDLONNECK
名称:On-Neck Pattern 颈上线
简介:二日K线模式,下跌趋势中,第一日长阴线,第二日开盘价较低, 收盘价与前一日最低价相同,阳线,实体较短,预示着延续下跌趋势。

1
2
3
4
5
6
7
8
9
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long black candle
 * - second candle: white candle with open below previous day low and close equal to previous day low
 * The meaning of "equal" is specified with TA_SetCandleSettings
 * outInteger is negative (-1 to -100): on-neck is always bearish
 * the user should consider that on-neck is significant when it appears in a downtrend, while this function 
 * does not consider it
 */
1
integer = CDLONNECK(open, high, low, close)

CDLSEPARATINGLINES - Separating Lines

函数名:CDLSEPARATINGLINES
名称:Separating Lines 分离线
简介:二日K线模式,上涨趋势中,第一日阴线,第二日阳线, 第二日开盘价与第一日相同且为最低价,预示着趋势继续。

1
2
3
4
5
6
7
8
9
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: black (white) candle
 * - second candle: bullish (bearish) belt hold with the same open as the prior candle
 * The meaning of "long body" and "very short shadow" of the belt hold is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish;
 * the user should consider that separating lines is significant when coming in a trend and the belt hold has 
 * the same direction of the trend, while this function does not consider it
 */
1
integer = CDLSEPARATINGLINES(open, high, low, close)

CDLSHORTLINE - Short Line Candle

函数名:CDLSHORTLINE
名称:Short Line Candle 短蜡烛
简介:一日K线模式,实体短,无上下影线

1
2
3
4
5
6
7
8
/* Proceed with the calculation for the requested range.
 * Must have:
 * - short real body
 * - short upper and lower shadow
 * The meaning of "short" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when white, negative (-1 to -100) when black;
 * it does not mean bullish or bearish
 */
1
integer = CDLSHORTLINE(open, high, low, close)

CDLSPINNINGTOP - Spinning Top

函数名:CDLSPINNINGTOP
名称:Spinning Top 纺锤
简介:一日K线,实体小。

1
2
3
4
5
6
7
8
/* Proceed with the calculation for the requested range.
 * Must have:
 * - small real body
 * - shadows longer than the real body
 * The meaning of "short" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when white or negative (-1 to -100) when black;
 * it does not mean bullish or bearish
 */
1
integer = CDLSPINNINGTOP(open, high, low, close)

CDLSTALLEDPATTERN - Stalled Pattern

函数名:CDLSTALLEDPATTERN
名称:Stalled Pattern 停顿形态
简介:三日K线模式,上涨趋势中,第二日长阳线, 第三日开盘于前一日收盘价附近,短阳线,预示着上涨结束

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
/* Proceed with the calculation for the requested range.
 * Must have:
 * - three white candlesticks with consecutively higher closes
 * - first candle: long white
 * - second candle: long white with no or very short upper shadow opening within or near the previous white real body
 * and closing higher than the prior candle
 * - third candle: small white that gaps away or "rides on the shoulder" of the prior long real body (= it's at 
 * the upper end of the prior real body)
 * The meanings of "long", "very short", "short", "near" are specified with TA_SetCandleSettings;
 * outInteger is negative (-1 to -100): stalled pattern is always bearish;
 * the user should consider that stalled pattern is significant when it appears in uptrend, while this function 
 * does not consider it
 */
1
integer = CDLSTALLEDPATTERN(open, high, low, close)

CDLSTICKSANDWICH - Stick Sandwich

函数名:CDLSTICKSANDWICH
名称:Stick Sandwich 条形三明治
简介:三日K线模式,第一日长阴线,第二日阳线,开盘价高于前一日收盘价, 第三日开盘价高于前两日最高价,收盘价于第一日收盘价相同。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: black candle
 * - second candle: white candle that trades only above the prior close (low > prior close)
 * - third candle: black candle with the close equal to the first candle's close
 * The meaning of "equal" is specified with TA_SetCandleSettings
 * outInteger is always positive (1 to 100): stick sandwich is always bullish;
 * the user should consider that stick sandwich is significant when coming in a downtrend, 
 * while this function does not consider it
 */
1
integer = CDLSTICKSANDWICH(open, high, low, close)

CDLTHRUSTING - Thrusting Pattern

函数名:CDLTHRUSTING
名称:Thrusting Pattern 插入
简介:二日K线模式,与颈上线类似,下跌趋势中,第一日长阴线,第二日开盘价跳空, 收盘价略低于前一日实体中部,与颈上线相比实体较长,预示着趋势持续。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long black candle
 * - second candle: white candle with open below previous day low and close into previous day body under the midpoint;
 * to differentiate it from in-neck the close should not be equal to the black candle's close
 * The meaning of "equal" is specified with TA_SetCandleSettings
 * outInteger is negative (-1 to -100): thrusting pattern is always bearish
 * the user should consider that the thrusting pattern is significant when it appears in a downtrend and it could be 
 * even bullish "when coming in an uptrend or occurring twice within several days" (Steve Nison says), while this 
 * function does not consider the trend
 */
1
integer = CDLTHRUSTING(open, high, low, close)

CDLTRISTAR - Tristar Pattern

函数名:CDLTRISTAR
名称:Tristar Pattern 三星
简介:三日K线模式,由三个十字组成, 第二日十字必须高于或者低于第一日和第三日,预示着反转。

1
2
3
4
5
6
7
/* Proceed with the calculation for the requested range.
 * Must have:
 * - 3 consecutive doji days
 * - the second doji is a star
 * The meaning of "doji" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish
 */
1
integer = CDLTRISTAR(open, high, low, close)

CDLUNIQUE3RIVER - Unique 3 River

函数名:CDLUNIQUE3RIVER
名称:Unique 3 River 奇特三河床
简介:三日K线模式,下跌趋势中,第一日长阴线,第二日为锤头,最低价创新低,第三日开盘价低于第二日收盘价,收阳线, 收盘价不高于第二日收盘价,预示着反转,第二日下影线越长可能性越大。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: long black candle
 * - second candle: black harami candle with a lower low than the first candle's low
 * - third candle: small white candle with open not lower than the second candle's low, better if its open and 
 *   close are under the second candle's close
 * The meaning of "short" and "long" is specified with TA_SetCandleSettings
 * outInteger is positive (1 to 100): unique 3 river is always bullish and should appear in a downtrend 
 * to be significant, while this function does not consider the trend
 */
1
integer = CDLUNIQUE3RIVER(open, high, low, close)

CDLXSIDEGAP3METHODS - Upside/Downside Gap Three Methods

函数名:CDLXSIDEGAP3METHODS
名称:Upside/Downside Gap Three Methods 上升/下降跳空三法
简介:五日K线模式,以上升跳空三法为例,上涨趋势中,第一日长阳线,第二日短阳线,第三日跳空阳线,第四日阴线,开盘价与收盘价于前两日实体内, 第五日长阳线,收盘价高于第一日收盘价,预示股价上升。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/* Proceed with the calculation for the requested range.
 * Must have:
 * - first candle: white (black) candle
 * - second candle: white (black) candle
 * - upside (downside) gap between the first and the second real bodies
 * - third candle: black (white) candle that opens within the second real body and closes within the first real body
 * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish;
 * the user should consider that up/downside gap 3 methods is significant when it appears in a trend, while this 
 * function does not consider it
 */
1
integer = CDLXSIDEGAP3METHODS(open, high, low, close)

文档 函数分组