Pharos
TAKline

TA.CDLEVENINGSTAR() - 黄昏之星

Evening Star 黄昏之星,三K线看跌反转形态,强烈的顶部反转信号。

返回K线形态目录


语法

python
TA.CDLEVENINGSTAR(opens, highs, lows, closes)
TA.CDLEVENINGSTAR(opens, highs, lows, closes, penetration=0.3)

参数

参数类型说明默认值
penetrationfloat第三根K线渗透程度0.3

返回值

  • -100:识别到黄昏之星(看跌信号)
  • 0:未识别到

形态特征

  1. 第一根:上升中的阳线
  2. 第二根:向上跳空的小实体
  3. 第三根:阴线,收盘深入第一根实体

信号强度

⭐⭐⭐⭐⭐ 非常强烈的顶部反转信号


使用示例

python
def evening_star_strategy():
    records = exchange.GetRecords()
    opens = [r['Open'] for r in records]
    highs = [r['High'] for r in records]
    lows = [r['Low'] for r in records]
    closes = [r['Close'] for r in records]
    
    pattern = TA.CDLEVENINGSTAR(opens, highs, lows, closes, 0.3)
    
    if pattern[-1] == -100:
        Log("黄昏之星 - 强烈顶部反转")
        
        rsi = TA.RSI(closes, 14)
        if rsi[-4] > 65:
            exchange.Sell(-1, 1)
            
            atr = TA.ATR(records, 14)
            stop = highs[-2] + atr[-1]
            Log(f"做空入场,止损: {stop:.2f}")

相关形态


返回K线形态目录 | 返回 TA 指标总目录