等级: 专业版
- 注册:
- 2022-1-11
- 曾用名:
|
楼主 |
发表于 2022-1-24 13:43
|
显示全部楼层
BIGUPTT1:=BIGUPHF+BIGUP1+BIGUP2+BIGUP3+BIGUP4+BIGUP5+BIGUP6+BIGUP7+BIGUP8+BIGUP9+BIGUP10;
BIGDNTT1:=BIGDNHF+BIGDN1+BIGDN2+BIGDN3+BIGDN4+BIGDN5+BIGDN6+BIGDN7+BIGDN8+BIGDN9+BIGDN10;
KD:= BIGUPTT1>=11 AND DIFFHF>1 AND DIFF1>2;//开多条件
PD:= MACDHF<0 OR (DIFF3>=5 AND MACD_UP3<0) OR (DIFF2>=3 AND MACD_UP2<0) OR (DIFF1>=2 AND MACD_UP1<0);
KK:= BIGDNTT1>=11 AND DIFFHF<-1 AND DIFF1<-2;//开空条件
PK:= MACDHF>0 OR (DIFF3<=-5 AND MACD_DOWN3<0) OR (DIFF2<=-3 AND MACD_DOWN2<0) OR (DIFF1<=-2 AND MACD_DOWN1<0);
TSELL(PK,0,MKT,0,0,'','10003739'); //平空信号
TBUY(KD AND TBUYHOLDINGEX('','10003728',2)=0,5,MKT,0,0,'','10003728'); //开多信号
TSELL(PD,0,MKT,0,0,'','10003728'); //平多信号
TBUY(KK AND TBUYHOLDINGEX('','10003739',2)=0,5,MKT,0,0,'','10003739'); //开空信号
DEBUGFILE('D:\test.txt','当前BIGUPTT1为%.2f',BIGUPTT1);
DEBUGFILE('D:\test.txt','当前BIGDNTT1为%.2f',BIGDNTT1);
DEBUGFILE('D:\test.txt','当前DIFFHF为%.2f',DIFFHF);
DEBUGFILE('D:\test.txt','当前DIFF1为%.2f',DIFF1);
DEBUGFILE('D:\test.txt','当前TBUYHOLDINGEX为%.2f',TBUYHOLDINGEX('','10003739',2));
DEBUGFILE('D:\test.txt','当前A为%.2f',KK and TBUYHOLDINGEX('','10003739',2));
DEBUGFILE('D:\test.txt','当前B为%.2f',BIGDNTT1>=11);
DEBUGFILE('D:\test.txt','当前C为%.2f',DIFFHF<-1);
DEBUGFILE('D:\test.txt','当前D为%.2f',DIFF1<-2);
DEBUGFILE('D:\test.txt','当前E为%.2f',KD and TBUYHOLDINGEX('','10003728',2));
DEBUGFILE('D:\test.txt','当前F为%.2f',BIGUPTT1>=11);
DEBUGFILE('D:\test.txt','当前G为%.2f',DIFFHF>1);
DEBUGFILE('D:\test.txt','当前H为%.2f',DIFF1>2);
DEBUGFILE('D:\test.txt','当前I为%.2f',DIFFHF);
DEBUGFILE('D:\test.txt','当前J为%.2f',DIFF1); |
|