以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  盘中创日内新高买入,创日内新低卖出  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=95877)

--  作者:kakasky
--  发布时间:2016/4/6 12:54:48
--  盘中创日内新高买入,创日内新低卖出

请教老师,在1分钟周期内怎么写下面的开仓条件:

在盘中1分钟K线创日内新高时做多,创日内新低时做空,同时前日的收盘价止损。


--  作者:jinzhe
--  发布时间:2016/4/6 13:32:45
--  

if h=hhv(h,todaybar) then buy(holding=0,1,marketr);

if l=llv(l,todaybar) then buyshort(holding=0,1,marketr);

 

if enterprice<ref(c,todaybar) then sell(1,0,marketr);

if enterprice>ref(c,todaybar) then sellshort(1,0,marketr);