MTM:=C-REF(C,1);
 DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
 YXF:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
加仓:=IF(FILTER(YXF=1,5),20,0);

买:=(ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG
 (3,5),2)<=REF(ZIG(3,5),3));
卖:=(ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND (REF(ZIG
 (3,5),2)>=REF(ZIG(3,5),3));

 P1:=5;
 P2:=4;
 VARA:=LLV(LOW,P1);
 VARB:=HHV(HIGH,P1);
 K:= EMA((CLOSE-VARA)/(VARB-VARA)*100,P2);
 D:= EMA(0.667*REF(K,1)+0.333*K,2);
 BBIS:=(MA(CLOSE,2)+MA(CLOSE,3)+MA(CLOSE,5))/3;
 BBIL:=(MA(CLOSE,8)+MA(CLOSE,13)+MA(CLOSE,21))/3;
 IF (BARSLAST(加仓=20)<2 AND BARSLAST(买=1)<3 AND BARSLAST(CROSS(K,D))<2 AND CLOSE>BBIS AND (加仓=20 OR 买=1 OR CROSS(K,D)))
 BUY;
 IF (BARSLAST(卖=1)<3 AND BARSLAST(CROSS(D,K))<2 AND (卖=1 OR CROSS(D,K)))
 SELL;

 DDJL=((ZDMR[-1]+BDMR[-1])-(ZDMC[-1]+BDMC[-1]))/SHGZG*100;
 //DDJL:=((IF(ISNULL(ZDMR[-1]),0,ZDMR)+IF(ISNULL(BDMR[-1]),0,BDMR))-(IF(ISNULL(ZDMC[-1]),0,ZDMC)+IF(ISNULL(BDMC[-1]),0,BDMC)))/SHGZG*100;
 MAD3=MA(DDJL,3);
 MAD5=MA(DDJL,5);
 MAD8=MA(DDJL,8);
 MAD13=MA(DDJL,13);
 MADL=(MAD3+MAD5+MAD8)/3;
 DRAWTEXT((DDJL>2 AND LOW/REF(CLOSE,1)<0.92),LOW,’注意’)
 [local]1[/local]

 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。