以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  代码测试无结果,请帮忙看一下是什么原因,谢谢  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=11871)

--  作者:huifeng623
--  发布时间:2012/5/22 10:53:27
--  代码测试无结果,请帮忙看一下是什么原因,谢谢

if (ref(c,1)<j and c>=j and time>t) then
begin
buy(HOLDING=0,4,LIMIT,c);
end

if (HOLDING>0 and time>t) then
begin
sell(c-ENTERPRICE>=a*y or ENTERPRICE-c>=a*s,4,LIMIT,c);
end

if (ref(c,1)>j and c<=j and time>t) then
begin
buyshort(HOLDING=0,4,limit,c);
end

if (HOLDING<0 and time>t) then
begin
sellshort(ENTERPRICE-c>=a*y or c-ENTERPRICE>=a*s,4,limit,c);
end

 

其中,j,t,s,y等都是参数,选择的是CU08,保证金比例15%,手续费0.016%,没有使用平仓条件


--  作者:just
--  发布时间:2012/5/22 10:55:26
--  

把你的参数设置一并附上。