TAKline
TA.CDLRISEFALL3METHODS() - 上升下降三法
Rising/Falling Three Methods 上升下降三法,趋势持续形态。
语法
python
TA.CDLRISEFALL3METHODS(opens, highs, lows, closes)返回值
- 100:上升三法(看涨持续)
- -100:下降三法(看跌持续)
- 0:未识别到
形态特征
上升三法
- 第一根:长阳线
- 中间3根:小K线回调整理
- 最后一根:长阳线突破
下降三法
- 第一根:长阴线
- 中间3根:小K线反弹整理
- 最后一根:长阴线突破
信号解读
趋势中的短暂整理后继续原趋势,是持续信号。
使用示例
python
def three_methods():
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.CDLRISEFALL3METHODS(opens, highs, lows, closes)
if pattern[-1] == 100:
Log("上升三法 - 趋势持续")
exchange.Buy(-1, 0.8)
elif pattern[-1] == -100:
Log("下降三法 - 趋势持续")
exchange.Sell(-1, 0.8)注意事项
- 确认趋势中使用
- 整理期成交量萎缩更好
- 突破时最好放量