Pharos
TAKline

TA.CDL3BLACKCROWS() - 三只乌鸦

3 Black Crows 三只乌鸦,三根连续下跌的阴线,是强烈的顶部反转信号。

返回K线形态目录


语法

python
TA.CDL3BLACKCROWS(opens, highs, lows, closes)

参数

参数类型说明
opensarray开盘价序列
highsarray最高价序列
lowsarray最低价序列
closesarray收盘价序列

返回值

返回整数数组:

  • -100:识别到三只乌鸦(看跌)
  • 0:未识别到

形态特征

  1. 三根阴线:连续三根实体较长的阴线
  2. 逐步下跌:每根收盘价低于前一根
  3. 开盘在实体内:每根开盘价在前一根实体内
  4. 影线较短:上下影线都很短
  5. 出现位置:上升趋势末期或高位

识别标准

plaintext
1. 连续3根阴线:Close[i] < Open[i]
2. 递减收盘:Close[-1] < Close[-2] < Close[-3]
3. 开盘在实体内:Open[-2] < Close[-3] 且 Open[-2] > Close[-3]的某个点
4. 实体较长:每根阴线实体 > 平均实体

信号强度

特征强度说明
标准形态⭐⭐⭐⭐高位出现,强烈看跌
影线极短⭐⭐⭐⭐⭐卖方完全控盘
配合放量⭐⭐⭐⭐⭐确认性极强
连续跳空⭐⭐⭐⭐⭐恐慌性下跌

基础示例

python
def three_black_crows_detection():
    records = exchange.GetRecords()
    if len(records) < 50:
        return
    
    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.CDL3BLACKCROWS(opens, highs, lows, closes)
    
    if pattern[-1] == -100:
        Log("⚠️ 出现三只乌鸦,强烈看跌信号")
        
        # 检查位置
        sma50 = TA.SMA(closes, 50)
        if closes[-3] > sma50[-3]:  # 高位出现
            Log("高位三只乌鸦 → 准备做空或平仓")
            
            # 立即行动
            exchange.Sell(-1, 1)  # 平多仓
            Log("平掉所有多仓")

高级应用

三只乌鸦反转策略

python
def three_crows_reversal():
    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]
    volumes = [r['Volume'] for r in records]
    
    pattern = TA.CDL3BLACKCROWS(opens, highs, lows, closes)
    rsi = TA.RSI(closes, 14)
    
    if pattern[-1] == -100:
        # 确认在高位
        if rsi[-4] > 65:  # 形态前RSI在高位
            Log("高位三只乌鸦确认")
            
            # 检查成交量
            avg_vol = sum(volumes[-20:-3]) / 17
            recent_vol = sum(volumes[-3:]) / 3
            
            if recent_vol > avg_vol * 1.2:
                Log("放量三只乌鸦,信号极强")
                
                # 做空策略
                atr = TA.ATR(records, 14)
                entry_price = closes[-1]
                stop_loss = highs[-3] + atr[-1]  # 第一根乌鸦上方
                
                exchange.Sell(-1, 1)
                Log(f"做空入场: {entry_price:.2f}")
                Log(f"止损位: {stop_loss:.2f}")

三只乌鸦 + MACD背离

python
def crows_macd_divergence():
    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.CDL3BLACKCROWS(opens, highs, lows, closes)
    macd_result = TA.MACD(closes, 12, 26, 9)
    macd_dif = macd_result[0]
    
    if pattern[-1] == -100:
        # 检查MACD顶背离
        # 价格创新高,MACD未创新高
        price_higher = closes[-4] > closes[-10]
        macd_lower = macd_dif[-4] < macd_dif[-10]
        
        if price_higher and macd_lower:
            Log("三只乌鸦 + MACD顶背离 → 极强看跌")
            
            # 激进做空
            exchange.Sell(-1, 1.5)  # 1.5倍仓位
            
            # 分级止损
            atr = TA.ATR(records, 14)
            stop_loss_1 = closes[-1] + 1.5 * atr[-1]  # 紧止损
            stop_loss_2 = highs[-3] + 2 * atr[-1]  # 松止损
            
            Log(f"紧止损: {stop_loss_1:.2f}")
            Log(f"松止损: {stop_loss_2:.2f}")

信号解读

出现位置分析

  1. 上升趋势顶部(最佳)

    • 趋势反转信号
    • 可靠性极高
    • 建议做空或平多
  2. 横盘震荡高位

    • 可能向下突破
    • 谨慎做空
    • 等待确认
  3. 下降趋势中途

    • 继续下跌信号
    • 持有空仓
    • 可加仓做空

确认条件

必要条件

  • ✅ 出现在上升趋势末期
  • ✅ 前期RSI > 60
  • ✅ 三根阴线实体均较长

增强条件

  • 🔥 成交量逐渐放大
  • 🔥 MACD顶背离
  • 🔥 跌破关键支撑位
  • 🔥 第四根K线继续下跌

止损止盈

python
def crows_risk_management():
    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.CDL3BLACKCROWS(opens, highs, lows, closes)
    
    if pattern[-1] == -100:
        atr = TA.ATR(records, 14)
        entry = closes[-1]
        
        # 止损:第一根乌鸦最高点上方
        stop_loss = max(highs[-3], highs[-2], highs[-1]) + atr[-1]
        
        # 止盈:风险回报比1:3
        risk = stop_loss - entry
        target_1 = entry - risk * 1.5  # 目标1
        target_2 = entry - risk * 3    # 目标2
        
        Log(f"入场: {entry:.2f}")
        Log(f"止损: {stop_loss:.2f} (风险: {risk:.2f})")
        Log(f"目标1: {target_1:.2f}")
        Log(f"目标2: {target_2:.2f}")

参数优化

时间周期

周期可靠性持续时间建议
日线⭐⭐⭐⭐⭐数周最佳
4小时⭐⭐⭐⭐数日较好
1小时⭐⭐⭐数小时需确认
15分钟⭐⭐短暂不推荐

注意事项

  1. 必须在高位:低位三只乌鸦意义不大
  2. 需要确认:第四根K线继续下跌最好
  3. 快速行动:一旦确认,立即执行
  4. 严格止损:万一失败,及时退出
  5. 成交量重要:放量下跌更可靠

失败案例

三只乌鸦也可能失败:

python
# 失败信号
1. 第四根K线收阳线
2. 快速反弹超过第一根乌鸦开盘价
3. 成交量萎缩
4. 出现在下降趋势底部

对比形态

形态方向可靠性K线数
三只乌鸦看跌⭐⭐⭐⭐⭐3
三白兵看涨⭐⭐⭐⭐⭐3
黄昏之星看跌⭐⭐⭐⭐3
乌云盖顶看跌⭐⭐⭐2

相关形态


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