用法:红蓝合一观察,红线走在蓝线上就行。
此指标为看了先辈的指标深受启发,注重自已的思路而成
MA5:=MA(C,5);
MA20:=MA(C,20);
A1:= REF(MA5,1)*0.98;
A2:= REF(MA5,2)*0.98;
A3:=REF(MA20,1)*0.98;
A4:=REF(MA20,2)*0.98;
B1:= BARSLAST(REF(C,2)>=REF(MA5,2) AND REF(C,1)<REF(MA5,1))+1;
B2:= BARSLAST(REF(C,2)>=REF(MA5,2) AND REF(C,1)<REF(MA5,1))+2;
B3:=BARSLAST(REF(C,2)>=REF(MA20,2) AND REF(C,1)<REF(MA20,1))+2;
B4:=BARSLAST(REF(C,2)>=REF(MA20,2) AND REF(C,1)<REF(MA20,1))+1;
DZ:=IF((REF(C,2)>=REF(MA5,2)) AND (REF(C,1)<REF(MA5,1)),IF(REF(MA5,2)<REF(MA5,1),A1,A2),IF(BARSSINCE(REF(C,2)>=REF(MA5,2) AND REF(C,1)<REF(MA5,1))>0,IF(REF(MA5, B2)< REF(MA5, B1),REF(MA5,B1)*0.98, REF(MA5,B2)*0.98), REF(MA5,1)));
ZZ:=IF((REF(C,2)>=REF(MA20,2)) AND (REF(C,1)<REF(MA20,1)),IF(REF(MA20,2)<REF(MA20,1),A3,A4),IF(BARSSINCE(REF(C,2)>=REF(MA20,2) AND REF(C,1)<REF(MA20,1))>0,IF(REF(MA20, B3)< REF(MA20, B4),REF(MA20,B4)*0.98, REF(MA20,B3)*0.98), REF(MA20,1)));
STICKLINE(ZZ,A3,A3,5,0),COLORRED,LINETHICK5;
STICKLINE(DZ,A4,A4,5,0),COLORBLUE;