一、通达信SKDJ顶底指标公式
{主力筹码 2}
CVAR8:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
CVAR9:=SMA(CVAR8,13,8);
风险:CEILING(SMA(CVAR9,13,8)),LINETHICK3,COLORRED;
涨跌:=MA(3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2*SMA(SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1),5),LINETHICK3,COLORYELLOW;
DRAWTEXT(CROSS(风险,涨跌) && 风险<20,风险,'预'),COLORYELLOW;
DRAWICON(风险 >= REF(风险,1) && REF(风险,2) > REF(风险,1),风险,1);
DRAWICON(风险 <= REF(风险,1) && REF(风险,1) > REF(风险,2),风险,2);
{SKDJ}
SKDJN:=9;SKDJM:=3;
SKDJ_LOWV:=LLV(LOW,SKDJN);
SKDJ_HIGHV:=HHV(HIGH,SKDJN);
SKDJ_RSV:=EMA((CLOSE-SKDJ_LOWV)/(SKDJ_HIGHV-SKDJ_LOWV)*100,SKDJM);
K0:EMA(SKDJ_RSV,SKDJM),COLORWHITE;
D0:MA(K0,SKDJM),COLORYELLOW;
乖离率:K0/D0;
DRAWICON(CROSS(D0,K0),(D0+K0)/2,37);
DRAWICON(CROSS(K0,D0),(D0+K0)/2,1);
{背离}
A1:=BARSLAST(REF(CROSS(K0,D0),1));
底背离:REF(CLOSE,A1+1)>CLOSE AND K0>REF(K0,A1+1) AND CROSS(K0,D0);
DRAWLINE(A1=0,D0,底背离,D0,0),COLORRED,DOTLINE;
A2:=BARSLAST(REF(CROSS(D0,K0),1));
顶背离:REF(CLOSE,A2+1)<CLOSE AND REF(D0,A2+1)>D0 AND CROSS(D0,K0);
DRAWLINE(A2=0,D0,顶背离,D0,0),COLORGREEN,DOTLINE;
DRAWTEXT(底背离>0,D0-5,'底背离'),COLORRED;
DRAWTEXT(顶背离>0,D0-5,'顶背离'),COLORGREEN;
K60:=K0#MIN60;
D60:=D0#MIN60;
XG:IF((CROSS(K60,D60)) || (K60>REF(K60,1)>REF(K60,2) && K60/D60 <=1) || (K60>REF(K60,1) && REF(K60,1)<=REF(K60,2)) ,15,0),COLORRED;
DBA:IF((CROSS(D60,K60)) || (K60>REF(K60,1)>REF(K60,2) && K60/D60 >=1) || (K60<REF(K60,1) && REF(K60,1)>=REF(K60,2)) ,90,100),COLORYELLOW;
DBS:IF((风险 <= REF(风险,1) && REF(风险,1) > REF(风险,2)) || 风险>95,85,100),COLORGREEN;
预警:IF(
(K0/D0 > REF(K0,1)/REF(D0,1))
,10,0),COLORYELLOW;
{
(K0>=REF(K0,1) || K0 < REF(K0,1)) &&
REF(K0,1) < REF(K0,2)
};
{(K0/D0 < REF(K0,1)/REF(D0,1)) || (K0/D0 > REF(K0,1)/REF(D0,1) && REF(K0,1)/REF(D0,1) > REF(K0,2)/REF(D0,2)) || (CROSS(K0,D0) && REF(K0,1)/REF(D0,1) > REF(K0,2)/REF(D0,2))};
二、通达信低点逆袭指标公式
VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(IF(CLOSE*1.2,VAR3*10,VAR3/10),3);
VAR5:=LLV(LOW,38);
VAR6:=HHV(VAR4,38);
VAR7:=IF(LLV(LOW,90),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
DD:=VAR8>5;
买入:=IF((COUNT(DD,2)=2),-20,0);
VAR1S:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2S:=SMA(ABS(LOW-VAR1S),13,1)/SMA(MAX(LOW-VAR1S,0),10,1);
VAR3S:=EMA(VAR2S,10);
VAR4S:=LLV(LOW,33);
VAR5S:=EMA(IF(LOW<=VAR4S,VAR3S,0),3);
主力进场:=IF(VAR5S>REF(VAR5S,1),VAR5S,0)*1.1,LINETHICK1,COLOR00FFFF;
洗盘:=IF(VAR5S<REF(VAR5S,1),VAR5S,0),COLORGREEN;
XG:IF((CROSS(洗盘,主力进场)AND 买入=-20),10,0);
STICKLINE(XG,0,6.5,4,0)COLORRED;
STICKLINE(XG,6.5,12,3,0);