问答交流

3.0如何写macd的表达式

由yewfei创建,最终由yewfei 被浏览 15 用户

老的版本取macd的表达式是ta_macd_macd_12_26_9_0

新版本不知道怎么写,看了下面的介绍还是不会取,求指导\n

标签

技术指标
评论
  • 这两种方法都可以
  • undefined
  • ta_macd(close,12,26,9) over (partition by instrument order by date),
  • m_ta_macd(close)
  • 我想在我表达式中去用这个,比如我想看的是macd中的hist小于0 返回1,大于0则返回0,我这么写的,IF(m_ta_macd(close) < 0,1,0) AS market_risk_indicator,但是会报错ConversionException: Conversion Error: Unimplemented type for cast (INTEGER -> DOUBLE[]),我看数据结构返回的是个list我不清楚怎么样才能拿到我想要的hist的值
  • 搞定了谢谢,直接按list中的位置指定了
{link}