通达信变色指标公式
RSV:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100-0;
K:SMA(RSV,9,1),COLORFFFFFF,LINETHICK2;
D:SMA(K,3,1),COLOR00FF00,LINETHICK2;
J:EMA(K,9),DOTLINE,COLORFF2400;
VARK:K,COLORWHITE,LINETHICK2;
上升 K:IF(VARK>REF(VARK,1),VARK,DRAWNULL),COLORRED,LINETHICK2;
走平 K:IF(VARK=REF(VARK,1),VARK,DRAWNULL),COLORFFFFFF,LINETHICK2;
下降 K:IF(VARK<REF(VARK,1),VARK,DRAWNULL),COLORFF2400,LINETHICK2;
VARD:D,COLORWHITE,LINETHICK2;
上升 D:IF(VARD>REF(VARD,1),VARD,DRAWNULL),COLORFF00FF,LINETHICK2;
走平 D:IF(VARD=REF(VARD,1),VARD,DRAWNULL),COLORFFFFFF,LINETHICK2;
下降 D:IF(VARD<REF(VARD,1),VARD,DRAWNULL),COLORGREEN,LINETHICK2;
VARJ:J,COLORWHITE;
上升 J:IF(VARJ>REF(VARJ,1),VARJ,DRAWNULL),COLORRED;
走平 J:IF(VARJ=REF(VARJ,1),VARJ,DRAWNULL),COLORFFFFFF;
下降 J:IF(VARJ<REF(VARJ,1),VARJ,DRAWNULL),COLORFF0000;
通达信成交量变色指标
TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD
=5,240,1)))));
MTIME:=MOD(FROMOPEN,TOTAL);
CTIME:=IF(MTIME<0.5,TOTAL,MTIME);
VVOL:IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL),NODRAW;
VOLUME:VOL,VOLSTICK,NODRAW;
MAVOL1:=MA(VOLUME,5);
MAVOL2:=MA(VOLUME,10);
量X:=V;
量X5:=MA(V,5);
量:=CAPITAL/VOL/5;
量5:=MA(量,5);
量10:=MA(量,10);
换手5:=MA(VOL*100/CAPITAL,5);
换手10:=MA(VOL*100/CAPITAL,10);
价5:=MA(C,5);
价10:=MA(C,10);
底:=C>MA(C,5)AND换手5>换手10AND量5<REF(MA(量5,1),5),NODRAW;
涨:=C>MA(C,5)AND换手5>换手10AND量5>REF(MA(量5,1),5),NODRAW;
涨2:=C>MA(C,5)AND换手5<换手10AND量5>REF(MA(量5,1),5),NODRAW;
涨3:=C>MA(C,5)AND换手5<换手10AND量5<REF(MA(量5,1),5),NODRAW;
STICKLINE(底,0,V,3,0),COLORRED;
STICKLINE(涨,0,V,1,0),COLORYELLOW;
STICKLINE(涨2,0,V,2.3,0),COLORYELLOW;
STICKLINE(涨3,0,V,1.8,0),COLORFF00FF;
短顶:=(量10-价10)<0.01;
顶:=C<MA(C,5)AND换手5<换手10AND量5>REF(MA(量5,1),5);
顶1:=C<MA(C,5)AND换手5<换手10AND量5<REF(MA(量5,1),5);
顶2:=C<MA(C,5)AND换手5>换手10AND量5<REF(MA(量5,1),5);
STICKLINE(顶,0,V,2.5,0),COLORFF4242;
STICKLINE(顶1,0,V,2.5,0),COLORFF4242;
STICKLINE(顶2,0,V,2.5,0),COLORFF4242;
操作线:=EMA(C,7),COLOR00FF00;
A:=(REF(操作线,1));
买卖:=(C-MA(C,5))*100,NODRAW;
M:=BARSLAST(买卖<0),NODRAW;
100*SUM(VOL,M)/CAPITAL;
买天数:IF(买卖>0,M,DRAWNULL),COLORRED,NODRAW;
N:=BARSLAST(买卖>0),NODRAW;
100*SUM(VOL,N)/CAPITAL;
卖天数:IF(买卖<0,N,DRAWNULL),COLORWHITE,NODRAW;
评论(0)