文华财经7macd预警指标公式源码:
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA),COLORSTICK;
JC:=CROSS(DIFF,DEA);
SC:=CROSSDOWN(DIFF,DEA);
N1:=BARSLAST(JC)+1;
N2:=BARSLAST(SC)+1;
X:(HHV(H,N1+6)-LLV(L,N1+6))/LLV(L,N1+6)*100;
X1:=(HHV(H,N2+6)-LLV(L,N2+6))/LLV(L,N2+6)*100;
MID:MA(CLOSE,26);
TMP2:=STD(CLOSE,26);
TOP:=MID+2*TMP2;
BOTTOM:=MID-2*TMP2;
Q1:=REF(SC&&DIFF>0&&VALUEWHEN(JC,DIFF<0),BARSLAST(SC))&&C<HHV(H,N1+6)-(HHV(H,N1+6)-LLV(L,N1+6))*0.38&&C<MID&&X>2&&X<4.5;
Q2:=REF(SC&&DIFF>0&&VALUEWHEN(JC,DIFF<0),BARSLAST(SC))&&C<HHV(H,N1+6)-(HHV(H,N1+6)-LLV(L,N1+6))*0.45&&C<MA(C,44)&&X>2&&X<4.5;
Q3:=REF(SC&&DIFF>0&&VALUEWHEN(JC,DIFF<0),BARSLAST(SC))&&C<HHV(H,N1+6)-(HHV(H,N1+6)-LLV(L,N1+6))*0.55&&C<MA(C,55)&&DEA>0&&X>2&&X<4.5;
DRAWICON(CROSS(Q1,0.5)||CROSS(Q2,0.5)||CROSS(Q3,0.5),L,1),VALIGN0;
CROSS(Q1,0.5),NOTICE('↓38%多弱');
CROSS(Q2,0.5),NOTICE('↓45%多');
CROSS(Q3,0.5),NOTICE('↓55%多强');