等级: 专业版
- 注册:
- 2022-1-11
- 曾用名:
|
OPENUP1:= IF(DIFF2>-1 AND MACD2>DIFF2 AND DEA2>-1 AND DEA_UP2>0 AND DIFF3>-1 AND MACD3>DIFF3,DIFF_UP2>0,0);
OPENDOWN1:= IF(DIFF2<1 AND MACD2<DIFF2 AND DEA2<1 AND DEA_DOWN2>0 AND DIFF3<1 AND MACD3<DIFF3,DIFF_DOWN2>0,0);
OPENUP2:= IF(DIFF2>-1 AND MACD2>DIFF2 AND DEA2>-1 AND DEA_UP2>0 AND MACD1>DIFF1,MACD_UP2>0,0);
OPENDOWN2:= IF(DIFF2<-1 AND MACD2<DIFF2 AND DEA2<1 AND DEA_UP2<0 AND MACD1<DIFF1,MACD_DOWN2>0,0);
OPENUP3:= IF(DIFF2>-1 AND MACD2>DIFF2 AND DEA_UP2>0,MACD_UP1>0,0);
OPENDOWN3:= IF(DIFF2<1 AND MACD2<DIFF2 AND DEA_DOWN2>0,MACD_DOWN1>0,0);
OPENUP4:= IF(DIFF2>-1 AND DIFF2>MACD2 AND DEA2>-1 AND DEA_UP2>0 AND DIFF3>-1 AND MACD3>DIFF3,MACD_UP2>0,0);
OPENDOWN4:= IF(DIFF2<1 AND DIFF2<MACD2 AND DEA2<1 AND DEA_DOWN2>0 AND DIFF3<1 AND MACD3<DIFF3,MACD_DOWN2>0,0);
OPENUP5:= IF(DIFF2>-1 AND DIFF2>MACD2 AND DEA_UP2>0 ,MACD_UP1>0,0);
OPENDOWN5:= IF(DIFF2<1 AND DIFF2<MACD2 AND DEA_DOWN2>0 ,MACD_DOWN1>0,0);
OPENUP6:= IF(DIFF2<-1 AND DIFF1>-1 AND DEA_UP2>0 AND DEA_UP3>0 ,MACD_UP2>0,0);
OPENDOWN6:= IF(DIFF2>1 AND DIFF1<1 AND DEA_DOWN2>0 AND DEA_DOWN3>0,MACD_DOWN2>0,0);
OPENUP:= IF((OPENUP1+OPENUP2+OPENUP3+OPENUP4+OPENUP5+OPENUP6)>0,1,0);
OPENDOWN:= IF((OPENDOWN1+OPENDOWN2+OPENDOWN3+OPENDOWN4+OPENDOWN5+OPENDOWN6)>0,1,0);
DRAWICON(OPENUP>0,LOW*0.996,4);
DRAWICON(OPENDOWN>0,HIGH*1.004,5);
BIGUPTT:= OPENUP+STKINDI('','MDF2.OPENUP',0,21,2)+STKINDI('','MDF4.OPENUP',0,21,4)+STKINDI('','MDF8.OPENUP',0,21,8)+STKINDI('','MDF15.OPENUP',0,3,0);
BIGDOWNTT:= OPENDOWN+STKINDI('','MDF2.OPENDOWN',0,21,2)+STKINDI('','MDF4.OPENDOWN',0,21,4)+STKINDI('','MDF8.OPENDOWN',0,21,8)+STKINDI('','MDF15.OPENDOWN',0,3,0);
KD:= BIGUPTT>1;//开多条件
PD:= BIGUPTT<2;//平多条件
KK:= BIGDOWNTT>1;//开空条件
PK:= BIGDOWNTT<2;//平空条件
TSELL(PK,0,MKT,0,0,'','10003739'); //平空信号
TBUY(KD AND TBUYHOLDINGEX('','10003729',2)=0,1,MKT,0,0,'','10003729'); //开多信号
TSELL(PD,0,MKT,0,0,'','10003729'); //平多信号
TBUY(KK AND TBUYHOLDINGEX('','10003739',2)=0,1,MKT,0,0,'','10003739'); //开空信号
以上,省略了参数定义部分,请老师指导看是哪里有问题,谢谢!
附件挂了引用的MDF2的代码和图形信号,其他周期与之相同。
|
-
图形信号
-
MDF2代码
|