通达信彩霞主图指标
源码
N:=12;
MA250:MA(C,250),LINETHICK2,COLORRED;
VAR1:=(HIGH+LOW+OPEN+CLOSE)/4;
黄金线:=EMA(3*VAR1-2*SMA(VAR1,2,1),13),COLORYELLOW,LINETHICK2;
CJ:=(3*C+L+O+H)/6;
多空线:=(20*CJ+19*REF(CJ,1)+18*REF(CJ,2)+17*REF(CJ,3)+16*REF(CJ,4)+15*
REF(CJ,5)+14*REF(CJ,6)+13*REF(CJ,7)+12*REF(CJ,8)+11*REF(CJ,9)+10*
REF(CJ,10)+9*REF(CJ,11)+8*REF(CJ,12)+7*REF(CJ,13)+6*REF(CJ,14)+5*
REF(CJ,15)+4*REF(CJ,16)+3*REF(CJ,17)+2*REF(CJ,18)+REF(CJ,20))/210,
COLORFF00FF,LINETHICK2;
亚当:=((HIGH + LOW + CLOSE)/3-MA((HIGH + LOW + CLOSE)/3,14))*100/
(1.5*AVEDEV((HIGH + LOW + CLOSE)/3,14));
N:=1,100,12;
夏娃:=EMA(亚当,N); X2:=亚当; X3:=夏娃;
STICKLINE(X2>=X3,LOW,HIGH,0,0),COLORRED;
STICKLINE(X2>=X3,CLOSE,OPEN,3,0),COLOR0000AA;
STICKLINE(X2>=X3,CLOSE,OPEN,2,0),COLOR0000CC;
STICKLINE(X2>=X3,CLOSE,OPEN,1,0),COLOR0000DD;
STICKLINE(X2>=X3,CLOSE,OPEN,0.3,0),COLOR0000FF;
STICKLINE(X2
STICKLINE(X2
STICKLINE(X2
STICKLINE(X2
STICKLINE(X2
STICKLINE(X2=黄金线 AND 黄金线>=多空线,OPEN,CLOSE,3,0),COLORFF00FF;
STICKLINE(X2=多空线 AND C<黄金线,OPEN,CLOSE,3,0),COLORBLUE;
X1:=(C+L+H)/3;
BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);
DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),
EMA8,'∠45升'),COLORWHITE;
E1:=BARSCOUNT(C);
AH:=HHV(H,200);
AL:=LLV(L,200);
B0:=(AH-AL)/40;
KB1:=H+B0;
KB2:=L-B0;
STICKLINE((E1+0)/34=FLOOR((E1+0)/34),KB2,KB2-0.8*B0,1,0),COLORYELLOW,LINETHICK3;
DRAWTEXT((E1+0)/34=FLOOR((E1+0)/34),KB2-B0,'时窗'),COLORYELLOW;
VAR81:=1;
VAR82:=((((2*CLOSE)+HIGH)+LOW) / 4);
低金叉进:=20,COLORYELLOW,LINETHICK2;
高死叉出:=90,COLORGREEN,LINETHICK3;
VAR84:=LLV(LOW,5);
VAR85:=HHV(HIGH,4);
C1:=(EMA((((VAR82-VAR84)/(VAR85-VAR84))*100),4)*VAR81),COLORFF00FF,LINETHICK2;
C2:=(EMA(((0.667*REF(C1,1))+(0.333*C1)),2)*VAR81),COLORFFFFFF,LINETHICK2;
条件:=CROSS(C1,C2) AND C1<40;
条件0:=CROSS(C2,C1) AND C1>90;
TJ1:=CROSS(C1,C2);
TJ2:=CROSS(C2,C1);
TJ3:=CROSS(C1,C2) AND REF(C1,1)<20;
TJ4:=CROSS(C2,C1) AND REF(C1,1)>80;
DRAWTEXT(条件0,H*1.02,'S'),COLORBLUE;
{DRAWTEXT(CROSS(C1,75),H*1.013,'险区'),COLORGREEN;}
DRAWTEXT(TJ3,L*0.98,'买'),COLORFF00FF;
DRAWTEXT(TJ4,H*1.02,'逃'),COLORBLUE;
均线:=MA(C,13),COLOR00FFFF;
X8:="MACD.MACD";
X:=HHV(REF(X8,1),BARSLAST(X8>0)+1);
A8:=(X8/REF(X8,1)-1)*100;
A1:=BARSLAST(CROSS(0,A8))+1;
DRAWTEXT(X8>0.618 AND CROSS(X,X8),H*1.035,'止赢'),COLORBLUE;
STICKLINE(X8>0.618 AND CROSS(X,X8),H*1.02,H*1.021,20,1),COLORBLUE;
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1))+1)>C AND
REF("MACD.DIF",BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1))+1)
<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA")
>0,L-0.02,'★M'),COLORFF00FF;{MACD底背离}
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1))+1)>C AND
REF("KDJ.K",BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1))+1)<"KDJ.K" AND
CROSS("KDJ.K","KDJ.D"),L-0.10,'◎K'),COLORFF00FF;{KDJ底背离}
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1))+1)>C AND
REF("RSI.RSI1",BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1))+1)
<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2")
>0,L-0.18,'◆R'),COLORFF00FF;{RSI底背离};
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1))+1)
AND REF("MACD.DIF",BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1))+1)
>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF")
>0,H+0.16,'★M'),COLORGREEN;{MACD顶背离};
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1))+1)
AND REF("KDJ.K",BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1))+1)
>"KDJ.K" AND CROSS("KDJ.D","KDJ.K")>0,H+0.08,'◎K'),COLORGREEN;{KDJ顶背离}
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1))+1)
REF("RSI.RSI1",BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1))+1)>"RSI.RSI1"
AND CROSS("RSI.RSI2","RSI.RSI1")>0,H+0.04,'◆R'),COLORGREEN;{RSI顶背离};
分水岭: DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL),COLOR00FFFF,LINETHICK2;
CCC:C,COLORFFFFFF;
UPPER : MA(CLOSE,14)*1.06,POINTDOT,COLORFF99FF,LINETHICK2;
LOWER : MA(CLOSE,14)*0.94,POINTDOT,COLORFF00FF,LINETHICK2;
MID:(UPPER+LOWER)/2,NODRAW,COLOR00FFFF,LINETHICK1;
VAR91:=(2*CLOSE+HIGH+LOW+OPEN)/5;
A51: (EMA(VAR91,1)+EMA(VAR91,2)+EMA(VAR91,3)+EMA(VAR91,4))/4,COLORCYAN,LINETHICK1;
W51:=(EMA(VAR91,1)+EMA(VAR91,2)+EMA(VAR91,3)+EMA(VAR91,4))/4;
A52: EMA(A51,2),COLORCYAN,LINETHICK1;
W52:=EMA(A51,2);
A53: EMA(A52,2),COLORCYAN,LINETHICK1;
W53:=EMA(A52,2);
A54: EMA(A53,2),COLORCYAN,LINETHICK1;
W54:=EMA(A53,2);
A55: EMA(A54,2),COLORCYAN,LINETHICK1;
W55:=EMA(A54,2);
A56: EMA(A55,2),COLORCYAN,LINETHICK1;
W56:= EMA(A55,2);
A57: EMA(A56,2),COLORCYAN,LINETHICK1;
W57:= EMA(A56,2);
IF(W51>REF(W51,1),A51,DRAWNULL),COLORRED,LINETHICK1;
IF(W52>REF(W52,1),A52,DRAWNULL),COLORRED,LINETHICK1;
IF(W52>REF(W53,1),A53,DRAWNULL),COLORRED,LINETHICK1;
IF(W52>REF(W54,1),A54,DRAWNULL),COLORRED,LINETHICK1;
IF(W52>REF(W55,1),A55,DRAWNULL),COLORRED,LINETHICK1;
IF(W52>REF(W56,1),A56,DRAWNULL),COLORRED,LINETHICK1;
IF(W52>REF(W57,1),A57,DRAWNULL),COLORRED,LINETHICK1;
DRAWICON(CROSS(CCC,LOWER ) AND CROSS(CCC,A53 ),LOWER,23);
DRAWICON(CROSS(UPPER,CCC),UPPER,15);