以文本方式查看主题

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

--  作者:冷锋566
--  发布时间:2015/8/8 12:42:21
--  连续的开仓信号
当信号出现时,只要求当时开仓一次图片点击可在新窗口打开查看,后面不再开仓,比如这个简单的突破,应该怎么改?谢谢!
h30:=ref(hhv(h,30),1);
l30:=ref(llv(l,30),1);

long:=h>h30;
if long then
begin
sellshort(holding<0,0,limitr,h30);
buy(1,1,limitr,h30);
end
partline(holding>0,l30,colorred);

short:=l<l30;
if short  then 
begin
sell(holding>0,0,limitr,l30);
buyshort(1,1,limitr,l30);
end
partline(holding<0,h30,colorgreen);

--  作者:jinzhe
--  发布时间:2015/8/10 9:01:30
--  
buy(holding=0,1,limitr,h30);
buyshort(holding=0,1,limitr,h30);
这样改

--  作者:冷锋566
--  发布时间:2015/8/11 20:20:14
--  
谢谢!