测试没有成交!!一直找不到原因!!求大神指导 就快交作业啦!!!!!!!!! [金字塔]
- 咨询内容:
VARIABLE: VA[15]=0 ; INPUT :Y(0);DIFF : EMA(CLOSE,S) - EMA(CLOSE,P);DEA : EMA(DIFF,M);MACD1 : 2*(DIFF-DEA), COLORSTICK;VOLDIFF : EMA(VOL,S) - EMA(VOL,P);VOLDEA : EMA(VOLDIFF,M);VOLMACD : VOLDIFF-VOLDEA, COLORSTICK;beginIF MACD1>0 THEN Y1:=Y+5; IFELSE Y1:=Y;IF MACD1>0.3 THEN Y2:=Y1-1; IFELSE Y2:=Y1;Y1:=0;IF MACD1<-0.3 THEN Y3:=Y2+1; IFELSE Y3:=Y2;Y2:=0;IF RET(MACD1,1)>MACD1 THEN Y4:=Y3-1; IFELSE Y4:=Y3+1;Y3:=0;IF RET(MACD1,2)>RET(MACD1,1) AND RET(MACD1,1)>MACD1 THEN Y5:=Y4-0.8; IFELSE Y5:=Y4;Y4:=0;IF CROSS(DIFF,DEA) THEN Y6:=Y3+10; IFELSE Y6:=Y3;Y3:=0;IF VOLMACD>0 AND MACD1>0 THEN Y7:=Y6+5 ; IFELSE Y7:=Y6;Y6:=0;IF CROSS(VOLDIFF,VOLDEA) AND CROSS(DIFF,DEA) THEN Y8:=Y7+10; IFELSE Y8:=Y7;Y7:=0;B:Y8;DEBUGOUT('',B)endVA[1]:=STKINDIEX ('SH000002','B',0,7,0,40)+0.01;VA[2]:=STKINDIEX ('SZ000063','B',0,7,0,40)+0.02;VA[3]:=STKINDIEX ('SZ000878','B',0,7,0,40)+0.03;VA[4]:=STKINDIEX ('SZ000983','B',0,7,0,40)+0.04;VA[5]:=STKINDIEX ('SH600009','B',0,7,0,40)+0.05;VA[6]:=STKINDIEX ('SH600019','B',0,7,0,40)+0.06;VA[7]:=STKINDIEX ('SH600028','B',0,7,0,40)+0.07;VA[8]:=STKINDIEX ('SH600036','B',0,7,0,40)+0.08;VA[9]:=STKINDIEX ('SH600050','B',0,7,0,40)+0.09;VA[10]:=STKINDIEX ('SH600104','B',0,7,0,40)+0.10;VA[11]:=STKINDIEX ('SH600196','B',0,7,0,40)+0.11;VA[12]:=STKINDIEX ('SH600320','B',0,7,0,40)+0.12;VA[13]:=STKINDIEX ('SH600519','B',0,7,0,40)+0.13;VA[14]:=STKINDIEX ('SH600583','B',0,7,0,40)+0.14;VA[15]:=STKINDIEX ('SH600795','B',0,7,0,40)+0.15;DEBUGOUT('当前值是',VA[1]); BEGIN FOR i = 1 TO 13 DO FOR j = i TO 13 DO IF VA[j] < VA[j+1] THEN BEGIN TEMP : = VA[j+1]; VA[j+1]: = VA[j]; VA[j]: = TEMP; END; ELSE TMEP: =0;END;STOCK1:=VA[1]*100-INTPART(VA[1])*100;STOCK2:=VA[2]*100-INTPART(VA[2])*100;STOCK3:=VA[3]*100-INTPART(VA[3])*100;BEGIN FOR N = 1 TO 15 DO VA[N]:=0;END;TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SZ000002');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SZ000063');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SZ000878');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SZ000983');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SH600009');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SH600019');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SH600028');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SH600036');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SH600050');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SH600104');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SH600196');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SH600320');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SH600519');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SH600583');TSELL(HOLDING>0,0,STP,CLOSE*0.95,0,'SH600795');STOCK1:=1;BEGINIF STOCK1=1 THEN TBUY(HOLDING=0,100,MKT,0,0,'SZ000002');IF STOCK1=2 THEN TBUY(HOLDING=0,100,MKT,0,0,'SZ000063');IF STOCK1=3 THEN TBUY(HOLDING=0,100,MKT,0,0,'SZ000878');IF STOCK1=4 THEN TBUY(HOLDING=0,100,MKT,0,0,'SZ000983');IF STOCK1=5 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600009');IF STOCK1=6 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600019');IF STOCK1=7 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600028');IF STOCK1=8 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600036');IF STOCK1=9 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600050');IF STOCK1=10 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600104');IF STOCK1=11 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600196');IF STOCK1=12 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600320');IF STOCK1=13 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600519');IF STOCK1=14 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600583');IF STOCK1=15 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600795');IF STOCK2=1 THEN TBUY(HOLDING=0,100,MKT,0,0,'SZ000OO2');IF STOCK2=2 THEN TBUY(HOLDING=0,100,MKT,0,0,'SZ000063');IF STOCK2=3 THEN TBUY(HOLDING=0,100,MKT,0,0,'SZ000878');IF STOCK2=4 THEN TBUY(HOLDING=0,100,MKT,0,0,'SZ000983');IF STOCK2=5 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600009');IF STOCK2=6 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600019');IF STOCK2=7 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600028');IF STOCK2=8 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600036');IF STOCK2=9 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600050');IF STOCK2=10 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600104');IF STOCK2=11 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600196');IF STOCK2=12 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600320');IF STOCK2=13 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600519');IF STOCK2=14 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600583');IF STOCK2=15 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600795');IF STOCK3=1 THEN TBUY(HOLDING=0,100,MKT,0,0,'SZ000OO2');IF STOCK3=2 THEN TBUY(HOLDING=0,100,MKT,0,0,'SZ000063');IF STOCK3=3 THEN TBUY(HOLDING=0,100,MKT,0,0,'SZ000878');IF STOCK3=4 THEN TBUY(HOLDING=0,100,MKT,0,0,'SZ000983');IF STOCK3=5 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600009');IF STOCK3=6 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600019');IF STOCK3=7 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600028');IF STOCK3=8 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600036');IF STOCK3=9 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600050');IF STOCK3=10 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600104');IF STOCK3=11 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600196');IF STOCK3=12 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600320');IF STOCK3=13 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600519');IF STOCK3=14 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600583');IF STOCK3=15 THEN TBUY(HOLDING=0,100,MKT,0,0,'SH600795');STOCK1:=0;STOCK2:=0;STOCK3:=0;END; 第一次写 测试总是没有成交 是哪里出问题了啊 求指导!!!
- 金字塔客服:
测试指的是公式测评还是模拟交易?
- 用户回复:
公式评测,大神帮我看看后面的下单tbuy有没有问题 我把前面的屏蔽掉,加一个条件 都不能成交
- 网友回复:
后台策略不能测评,能测评的就只有是图表策略
- 网友回复: 那为什么我看那个海龟交易法可以 我该怎么模拟评测呢?
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容