以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  [求助]百分比转向操作程序,不能执行  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=167169)

--  作者:topfun
--  发布时间:2018/12/18 10:00:31
--  [求助]百分比转向操作程序,不能执行
我用意是建仓之后的任意价位开始,反向波动mbs7则立刻反手,这样写了却执行不了,请赐教,谢谢!
input:mbs7(5),ss(1,1,1000,1);
llv7:=llv(l,enterbars+2);
l7:=min(enterprice,llv7);
V7:=
c>l7*(100+mbs7)/100 and c>ref(c,1);
hhv7:=hhv(h,enterbars+2);
h7:=max(enterprice,hhv7);
P7:=
c<h7*(100-mbs7)/100 and c<ref(c,1);


CONBPK:=

V7=1
;
///////////////////////////////////////////
CONSPK:=
P7=1;

//---------------------------
sellshort(conbpk,0,thisclose),orderqueue,ignorecheckprice;
buy(conbpk and holding=0,ss,thisclose),orderqueue,ignorecheckprice;
sell(conspk,0,thisclose),orderqueue,ignorecheckprice;
buyshort(conspk and holding=0,ss,thisclose),orderqueue,ignorecheckprice;



--  作者:topfun
--  发布时间:2018/12/18 10:04:39
--  
检测粗心了,能执行,谢谢!