做多区域为红色K线,代表KDJ金叉,MACD金叉=双金叉看多区域。做空区域为绿色K线,代表KDJ死叉,MACD死叉=双死叉看空区域。强洗区域为黄色K线,代表KDJ死叉,MACD金叉=短空中多洗盘区域。初升区域为蓝色K线,代表KDJ金叉,MACD死叉=短多中空反弹区域。
DD:=(H+L+2*C)/4;
M3:EMA(DD,3);
M8:EMA(DD,8);
M21:EMA(DD,21);
M55:EMA(DD,55),LINETHICK2,COLOR00FF00;
TT:=BARSCOUNT(C);
PT:=IF(TT 55,TT,55);
上:M55+2.1*STD(C,PT),COLORRED;
下:M55-2.1*STD(C,PT),COLOR00FF00;
月涨幅:=(C-LLV(C,20))/LLV(C,20)*100;
月跌幅:=(HHV(H,20)-C)/HHV(H,20)*100;
DRAWTEXT(CROSS(上,M3),上,'抛'),COLORYELLOW;
DRAWTEXT(CROSS(M3,下),下,'抄'),COLORYELLOW;
HH:=MAX(MAX(MAX(M3,M8),M21),M55);
LL:=MIN(MIN(MIN(M3,M8),M21),M55);
SXZH:=HH/LL =1.03 AND M3 REF(M3,1)
AND M8 REF(M8,1) AND M21 REF(M21,1) AND M55 REF(M55,1);
SXZL:=HH/LL =1.03 AND M3 REF(M3,1)
AND M8 REF(M8,1) AND M21 REF(M21,1) AND M55 REF(M55,1);
向上:SXZH AND L HH AND C HH AND 月涨幅 月跌幅,NODRAW;
向下:SXZL AND H LL AND C LL AND 月涨幅 月跌幅,NODRAW;
DRAWICON(向上,MIN(L,LL)*0.97,1);
DRAWICON(向下,MAX(H,HH)*1.03,2);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);
DEA :=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
做多:=IF(K D AND MACD 0 AND V 1,2,0),COLORRED;
做空:=IF(K D AND MACD 0 AND V 1,-2,0),COLOR00FF00;
强洗:=IF(MACD 0 AND K D AND V 1,1,0),COLOR0099FF;
弱升:=IF(MACD 0 AND K D AND V 1,-1,0),COLORFFFF00;
CCI:= CCI.CCI
DRAWICON(CCI 185 AND H 上,H*1.02,6);
DRAWICON(CCI -185,L*0.98,5);
STICKLINE(做多,L,H,0.5,0),COLORRED;
STICKLINE(做多 AND C =O,C,O,3,1),COLORRED;
STICKLINE(做多 AND C O,C,O,3,0),COLORRED;
STICKLINE(做空,L,H,0.5,0),COLOR00FF00;
STICKLINE(做空 AND C =O,C,O,3,1),COLOR00FF00;
STICKLINE(做空 AND C O,C,O,3,0),COLOR00FF00;
STICKLINE(强洗,L,H,0.5,0),COLOR0099FF;
STICKLINE(强洗 AND C =O,C,O,3,1),COLOR0099FF;
STICKLINE(强洗 AND C O,C,O,3,0),COLOR0099FF;
STICKLINE(弱升,L,H,0.5,0),COLORFFFF00;
STICKLINE(弱升 AND C =O,C,O,3,1),COLORFFFF00;
STICKLINE(弱升 AND C O,C,O,3,0),COLORFFFF00;
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF 9.8,O,C,2,0),COLORRED;
STICKLINE(ZDF -9.8,O,C,2,0),COLORBLUE;
IF(M3 M8,M3,DRAWNULL),COLORFFFF00;
IF(M8 M21,M8,DRAWNULL),COLORFFFF00;
IF(M21 M55,M21,DRAWNULL),COLORFFFF00;
IF(M55 REF(M55,1),M55,DRAWNULL),COLORRED,LINETHICK2;