以文本方式查看主题

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

--  作者:987654jj
--  发布时间:2013/10/16 10:32:19
--  收盘最低最高价
低于5日收盘最低价卖出,高于5日收盘的最高价买入,应该怎么表示
--  作者:jinzhe
--  发布时间:2013/10/16 10:46:07
--  

nn:=todaybar;

if c>ref(hhv(c,270*5),todaybar) then buy;

if c<ref(llv(c,270*5),todaybar) then sell;

 

这里用的是股指一分钟,所以5天总共270*5根k线,其他周期用户做适当调整即可