以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  策略程序  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=67140)

--  作者:feixue30
--  发布时间:2014/7/8 15:51:42
--  策略程序
 求助,当MACD大于0.5时,下一时刻MACD值减小0.25时做空,怎么用金字塔写呢 

--  作者:jinzhe
--  发布时间:2014/7/8 16:10:53
--  
if ref(macd>0.5,1) and macd<=(ref(macd,1)-0.25) then buyshort(holding=0,1,market);