macd背离(源码、副图、贴图)介绍
macd背离(源码、副图、贴图)
DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);{来自经典副B}
DEA:=EMA(DIFF,9),COLORFFFF00;
MACD:=(DIFF-DEA)*2;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
底背离:REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
{抄底特准}
VAR1:=REF(CLOSE,1);
VAR2:=SMA(MAX(CLOSE-VAR1,0),7,1)/SMA(ABS(CLOSE-VAR1),7,1)*100;
特准:0.5*FILTER(REF(VAR2,1)<20 AND VAR2>REF(VAR2,1),5);
{经典抄底}
CS:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
经典抄底:IF((EMA(CS,2))*2>REF((EMA(CS,2))*2,1) AND REF((EMA(CS,2))*2,1)<REF((EMA(CS,2))*2,2) AND (EMA(CS,2))*2<26,1.6,0);
{红柱抄底}
BIAS1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离:=MA(BIAS,3);
STICKLINE(CROSS(BIAS,乖离) AND 乖离<-9.5,1.5,0,2,0),COLORRED;
gd16622