以下是通达信改编的《一飞冲天》副图指标 加密(无源码的请下载附件导入)
MID:=MA(C,20);
VART1:=POW((C-MID),2);
VART2:=MA(VART1,20);
VART3:=SQRT(VART2);
UPPER:=MID+2*VART3;
LOWER:=MID-2*VART3;
BOLL:=REF(MID,1),COLORFFFFFF;
UB:=REF(UPPER,1),COLOR00FFFF;
OK20:=BARSLAST(REF(C,1)<REF(UB,1)&&O<C&&C>=UB&&C>=H/1.003&&L<H);
OK21:=BARSLAST(REF(C,1)>REF(UB,1)&&C<UB);
OK23:=IF(CURRBARSCOUNT<=CONST(OK21+1),CONST(IF(OK21,OK21,OK21)),DRAWNULL);
OK25:=IF(CURRBARSCOUNT>=CONST(OK20+1)&&CURRBARSCOUNT<=CONST(OK20+1),CONST(IF(OK20+1,OK20+1,OK20+1)),DRAWNULL);
冲天:=IF(OK23 AND OK20,1,0);
冲天炮:=IF(OK23 AND OK20,1,0),COLORRED;
一飞冲天:IF(CROSS(0.5,冲天) AND CROSS(0.5,冲天炮),1,0),COLORYELLOW,LINETHICK2;
619122897.png
|