以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  交易系统测试正常但是没信号  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=50766)

--  作者:chockstick
--  发布时间:2013/4/8 11:27:20
--  交易系统测试正常但是没信号

 

formula1:

mavar1:ma(ref(close,1),n1);
mavar2:ma(ref(close,1),n2);

 

----------------------------------------------------------------------

formula2:

DayVarValue1:STKINDI(\'\',\'formula1.mavar1\',0,6);

DayVarValue2:STKINDI(\'\',\'formula1.mavar2\',0,6);

KD:=ref(close,2)>=DayVarValue1 and ref(close,1) >=DayVarValue1 and time<=0.143000000 and  time>=0.093000000;          //开多条件
PD:=ref(close,2)<=DayVarValue1 and ref(close,1) <=DayVarValue1;         //平多条件
KK:=ref(close,2)<=DayVarValue2 and ref(close,1)  <=DayVarValue2  and time<=0.143000000 &&time>=0.093000000;          //开空条件
PK:=ref(close,2)>=DayVarValue2 and ref(close,1) >=DayVarValue2;        //平空条件

BUY(KD AND HOLDING=0,5,MARKET);          //开多信号
SELL(PD and HOLDING>0,5,MARKET);                       //平多信号
BUYSHORT(KK AND HOLDING=0,5,MARKET);     //开空信号
SELLSHORT(PK AND HOLDING<0,5,MARKET);                  //平空信号

if time>=150000 then begin
sell(holding>0,5,market);
sellshort(holding<0,5,market);
end

 

 

-------------------------------------

两个代码测试正常,但在交易系统formula2当中,居然没有信号指标出来?

麻烦老师给跟踪测试看看是哪里有问题:

formula1计算的是股指连续日线指标值

formula2是应用在股指连续5min的k线上


--  作者:jinzhe
--  发布时间:2013/4/8 11:31:54
--  
time写错了,143000不是0点几