【图】通达信无忧箱体主图公式“脱色”
止损:REF(HHV(H,13),1)*0.95,COLORGREEN,DOTLINE;
DRAWTEXT(CURRBARSCOUNT=1,止损*0.996,'止损线'),COLORGREEN;
AB:=EMA(((2*C+H+L)/4-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8);
BA:=EMA(AB,5);
A1{高}:=REFDATE(REF(HHV(H,96),5),DATE); B1{低}:=REFDATE(REF(LLV(L,96),5),DATE);
D{中}:=((A1)+(B1))/2;
箱顶:IF(AB>0 AND AB-BA<=0,A1,A1),LINETHICK2,COLOR00FF00;
箱腰:IF(AB>0 AND AB-BA<=0,D,D),LINETHICK2,COLOR00FF00;
箱低:IF(AB>0 AND AB-BA<=0,B1,B1),LINETHICK2,COLOR00FF00;
高1:IF(AB>0 AND AB-BA>0,A1,DRAWNULL),LINETHICK2,COLORRED;
中1:IF(AB>0 AND AB-BA>0,D,DRAWNULL),LINETHICK2,COLORRED;
低1:IF(AB>0 AND AB-BA>0,B1,DRAWNULL),LINETHICK2,COLORRED;
C2:=REF(C,1);
涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);
跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);
{选股}
HHH:=CROSS(C,MA(L+(H-L)/2,25)*0.95);LLL:=CROSS(MA(L+(H-L)/2,25)*0.95,C);
CCC:=CROSS(H,MA(L+(H-L)/2,25)*1.15);DDD:=CROSS(H,MA(L+(H-L)/2,25)*1.25);
VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
DIR1:=ABS(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
ER1:=DIR1/VIR1;
CS1:=ER1*(0.8-2/8)+2/8;
CQ1:=CS1*CS1;
DIR2:=ABS(CLOSE-REF(CLOSE,10));
VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);
ER2:=DIR2/VIR2;
CS2:=ER2*(0.8-2/24)+2/24;
CQ2:=CS2*CS2;
DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW - (LOW*0.02)),7);
DRAWICON(CROSS(MA(VAR3,6),VAR1),(HIGH+(HIGH*0.02)),8);
PT:=REF(H,1)-REF(L,1);
CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;
AH:=CDP+PT;
AL:=CDP-PT;
NH:=CDP*2-REF(L,1);
NL:=CDP*2-REF(H,1);
强:IF(AH>REF(C,1)*1.1,REF(C,1)*1.1,AH)NODRAW;
阻:IF(NH>强,(强-CDP)*0.618+CDP,NH)NODRAW,COLOR00FFFF;
M:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL);
撑:IF(NL<M,CDP-(CDP-M)*0.618,NL)NODRAW,COLOR8080FF;
底:IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL)NODRAW,COLOR4080FF;
{量能饱和度}
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
【量能饱和】:=IF(SAT>1,1,SAT)*100,COLORYELLOW,NODRAW;
{活跃度}
LC:=REF(CLOSE,1);
RSI5:=(SMA(MAX(CLOSE-LC,0),3,1))/(SMA(ABS(CLOSE-LC),3,1))*100;
WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;
活跃度:=(RSI5-WR10),COLORFFFF00,LINETHICK1,NODRAW;
活跃度比:=IF(活跃度>=0,(活跃度+100)/2,100-ABS((活跃度-100)/2));
M1:=10;
P2:=80;
VAR11:=(C+H+O+L)/4;
买入:=XMA(VAR11,M1)*(1-P2/1000),COLORFFFFFF,LINETHICK2;
反弹:=EMA(EMA(EMA(HIGH,5),5),5)*0.95,COLORRED,LINETHICK1;
XG:=CROSS(买入,反弹);
DRAWTEXT(XG,(LOW -0.2),'暴' ),COLOR00FFFF;
MA5:MA(CLOSE,5),COLORFFFFFF,LINETHICK2;
MA13:MA(CLOSE,13),COLORFF00FF,LINETHICK2;
MA21:MA(CLOSE,21),COLOR00FFFF;