A1:3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);
黑马线:EMA(A1,5),LINETHICK2,COLOR6600FF;
A2:=(黑马线-REF(黑马线,1))/REF(黑马线,1)*100;
A3:=EMA(C,5);
A4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
趋势线:(MA(3*SMA(A4,6,1)-2*SMA(SMA(A4,5,1),5,1),2)),LINETHICK2,COLORYELLOW;
A5:=(HHV(H,60)-C)/(HHV(H,60)-LLV(L,60))*100;
DRAWTEXT(FILTER(REF(黑马线,1)>90 AND A2<0,7),黑马线,'跑'),COLOR00FF00;
DRAWTEXT(CROSS(A1,黑马线)AND 黑马线<A5,黑马线,'黑马');
DRAWTEXT(CROSS(黑马线,A5)AND 趋势线<80,黑马线,'追涨');
DRAWTEXT(CROSS(趋势线,0)AND 黑马线<40,5,'大黑马');
底部:(A2<-10 AND A2>REF(A2,1))*25,COLORRED;
DRAWICON(底部 AND A3>REF(A3,1),25,4);
机会来临:REF(IF((MA(C,5)-C)/C>0.04 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.04,30,0),1),COLORF00FF0;
大势已去:IF(CROSS(黑马线,A1)AND 黑马线>70 AND 趋势线>80,90,100),COLORFF0000;
【源码分享】太极圈主图指标公式(通达信电脑+手机版)
公式源码:
年:=1+(BARSLAST(YEAR!=REF(YEAR,1) OR DATETODAY(DATE)=1));
天数:=IF(PERIOD=5,年,DRAWNULL);
高1:=HHV(H,天数);
低1:=LLV(L,天数);
高低:(C-低1)/(高1-低1)*100,,NODRAW,COLORFFFF00;
振幅:(高1-低1)/低1*100,NODRAW,COLORWHITE;
天:CONST(高1),NODRAW,COLORYELLOW;
地:CONST(低1),NODRAW,COLOR00FF00;
强:CONST(高1-(高1-低1)*1/3),NODRAW,COLORFFFF00;
中:CONST(高1-(高1-低1)*1/2),NODRAW,COLORWHITE;
弱:CONST(高1-(高1-低1)*2/3),NODRAW,COLOR0099FF;
STICKLINE(C>0,CONST(高1-(高1-低1)*1/4),CONST(高1-(高1-低1)*1/4),2,0),COLORFF00FF;
STICKLINE(C>0,CONST(高1-(高1-低1)*3/4),CONST(高1-(高1-低1)*3/4),2,0),COLORFF00FF;
STICKLINE(C>0,天,天,10,0),COLORYELLOW;
STICKLINE(C>0,地,地,10,0),COLOR00FF00;
STICKLINE(C>0,强,强,10,0),COLORFFFF00;
STICKLINE(C>0,中,中,10,0),COLORWHITE;
STICKLINE(C>0,弱,弱,10,0),COLOR0099FF;
N:=12;
DP:=(H+L+2*C)/4;
DN:=ABS(CLOSE-REF(CLOSE,N));
VY:=SUM(ABS(CLOSE-REF(CLOSE,1)),N);
ER:=DN/VY;
FSC:=2/(2+1);
SSC:=2/(N+1);
SC:=ER*(FSC-SSC)+SSC;
SCSQ:=SC*SC;
KMA:DMA(DP,SCSQ),COLOR00FF00,LINETHICK2;
多空:EMA(DP,50),COLORFFFF00,LINETHICK2;
RC:=地;
DK:=(EMA(DP,12)-多空);
STICKLINE(DK>0 AND DK>REF(DK,1),RC,RC+DK,1,0),COLOR006699;
STICKLINE(DK>0 AND DK<=REF(DK,1),RC,RC+DK,1,1),COLORFF00AA;
STICKLINE(DK<0 AND DK>REF(DK,1),RC,RC+DK,1,0),COLOR998800;
STICKLINE(DK<0 AND DK<=REF(DK,1),RC,RC+DK,1,1),COLOR009900;
BUY2:=KMA>EMA(KMA,3);
DRAWKLINE(H,O,L,C);
【量H】:=IF((AMOUNT/C)/(HHV(AMOUNT,21)/HHV(C,21))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,21)/HHV(C,21))*100);
STICKLINE(【量H】=100,L,H,0.4,0),COLORYELLOW;
STICKLINE(【量H】=100 AND C>=O,C,O,4,1),COLORYELLOW;
STICKLINE(【量H】=100 AND C<O,C,O,4,0),COLORYELLOW;
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;
Q43:CONST(高1-(高1-低1)*1/4),NODRAW;
Q41:CONST(高1-(高1-低1)*3/4),NODRAW;
DK1:=DK+RC;
M20:=MA(DK1,20);
S:=STD(DK1,20);
高:=M20+2*S;
低:=M20-2*S;
【上】: 高,COLORFFFF00;
【下】: 低,COLORFFFF00;
IF(多空>MA(DP,50),多空,DRAWNULL),COLOR00FF00,LINETHICK2;
IF(BUY2=1,KMA,DRAWNULL),COLORRED,LINETHICK2;