通达信波段之王副图指标源码公式
EMA9:=EMA(CLOSE,9)*2;
EMAEMA9:=EMA(EMA(CLOSE,9),9)*2;
ZVAR1:=EMA(EMA(CLOSE,9),9);
控盘:(ZVAR1-REF(ZVAR1,1))/REF(ZVAR1,1)*1000,NODRAW;
STICKLINE(控盘<0,控盘,0,3,0),COLORWHITE;
STICKLINE(控盘<0 AND 控盘>REF(控盘,1),控盘,0,3,0),COLORB0B0B0;
A10:=CROSS(控盘,0);
无庄控盘:IF(控盘<0,控盘,0),DRAWNULL;
{K0:=IF(DATATYPE>8,8,1);
K1:=IF(DATATYPE=8,5,1);
K2:=IF(DATATYPE=0,3,1);
K3:=IF(DATATYPE=7,2,1);
K4:=IF(DATATYPE=6,1,1);
K5:=IF(DATATYPE<=5 AND DATATYPE>0,0.5,1);
K:=K0*K1*K2*K3*K4*K5;}
{DATA:DATATYPE;}
开始控盘:IF(A10,1,0),COLORYELLOW,NODRAW;
STICKLINE(控盘>REF(控盘,1) AND 控盘>0,控盘,0,3,0),COLORRED;
有庄控盘:IF(控盘>REF(控盘,1) AND 控盘>0,控盘,0),NODRAW;
ZVAR2:=100*WINNER(CLOSE*0.95);
STICKLINE(ZVAR2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0,3,0),COLORFF00FF;
高度控盘:IF(ZVAR2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0),NODRAW;
STICKLINE(控盘<REF(控盘,1) AND 控盘>0,控盘,0,3,0),COLOR00FF00;
主力出货:=IF(控盘<REF(控盘,1) AND 控盘>0,控盘,0);
N:=10;
F:=25;
VAR1:=HHV(HIGH,9)-LLV(LOW,9);
VAR2:=HHV(HIGH,9)-CLOSE;
VAR3:=CLOSE-LLV(LOW,9);
VAR4:=VAR2/VAR1*100-70;
VAR5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
VAR6:=(HIGH+LOW+OPEN+CLOSE)/4;
VAR7:=SMA(VAR3/VAR1*100,3,1);
VAR8:=LLV(LOW,34);
VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);
VARA:=IF(VAR9>100,VAR9-100,0);
VARB:=HHV(HIGH,34);
VARC:=EMA((VAR6-VAR8)/(VARB-VAR8)*100,13);
VARD:=EMA(0.667*REF(VARC,1)+0.333*VARC,2);
VARE:=SMA(MAX(CLOSE-REF(CLOSE,1),0)/CLOSE,8,1)/SMA(ABS(INDEXC-REF(INDEXC,1))/INDEXC,8,1)*100-25;
VARF:=MA(VARE,3);
VAR10:=REF(VARF,1);
生命线:EMA(VARD,N)-50,COLORFFAA00;
VAR11:=(CLOSE-LLV(LOW,F))/(HHV(HIGH,F)-LLV(LOW,F))*100;
K:=SMA(VAR11,3,1);
D:=SMA(K,3,1);
红灯亮买: STICKLINE(CROSS(VARC,VARD) AND VARC>VARD AND VARC<18,-14,-50,3,0), COLORRED;
见红:IF(VARC>18,-50,IF(CROSS(VARC,VARD) AND VARC>VARD AND VARC<18,-13,-50)),COLORYELLOW;{灯塔脉冲}
{FILLRGN(-50,-31.5,CROSS(VARC,VARD) AND VARC>VARD AND VARC<18),COLOR0000FF;}{画红色灯桩}
STICKLINE(CROSS(VARC,VARD) AND VARC>VARD AND VARC<18,-50,-31,6,0),COLOR0000FF;{画红色灯桩}
{PARTLINE(-12,CROSS(VARC,VARD) AND VARC>VARD AND VARC<18,RGB(0,0,255)),POINTDOT,LINETHICK7,COLOR0000FF;}{画浅蓝色灯辉}
{PARTLINE(-12,CROSS(VARC,VARD) AND VARC>VARD AND VARC<18,RGB(255,255,255)),POINTDOT,LINETHICK4,COLORFFFFFF;}{画白色灯芯}
IF(CROSS(VARC,VARD) AND VARC>VARD AND VARC<18,-12,DRAWNULL),COLORMAGENTA,POINTDOT,LINETHICK9;{画浅蓝色灯辉}
IF(CROSS(VARC,VARD) AND VARC>VARD AND VARC<18,-12,DRAWNULL),COLORWHITE,POINTDOT,LINETHICK5;{画白色灯芯}
DRAWTEXT_FIX(C>O,0.01,0.01,0,' 微信公众号:牛股基因分析'),COLORYELLOW;
浪尖: STICKLINE(CROSS(VARD,VARC) AND VARC<VARD AND VARC>60,40,50,12,1),COLORBLUE;
顶:IF(VARC<79,50,IF(CROSS(VARD,VARC) AND VARD>79 AND VARC>79,40,50)),COLOR00FF00;{灯塔脉冲}
{卖: STICKLINE(FILTER(CROSS(VARD,VARC),10) AND VARD>79 AND VARC>79,50,45,4,0),COLORGREEN;{画绿色倒灯桩}
{PARTLINE(18,CROSS(VARD,VARC) AND VARD>79 AND VARC>79),POINTDOT,LINETHICK7,COLOR00FF00;{画绿色灯辉}
{PARTLINE(18,CROSS(VARD,VARC) AND VARD>79 AND VARC>79),POINTDOT,LINETHICK4,COLORFFFFFF;{画白色灯芯}
KAR1:=3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)-2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
KAR2:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26))*100;
KAR3:=SMA(SMA(KAR2,3,1),3,1);
KAR4:=EMA(KAR3,5);
KAR5:=LLV(LOW,26);
KAR6:=HHV(HIGH,34);
KAR7:=EMA((CLOSE-KAR5)/(KAR6-KAR5)*4,4)*25;
KAR8:=100-KAR1;
KAR9:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
KAR10:=SMA(KAR9,3,1);
KAR11:=SMA(KAR10,3,1);
KAR12:=EMA(3*KAR10-2*KAR11,3);
KAR13:=(-1)*(EMA(KAR8,1)-50)+50;
KAR14:=EMA(100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14)),6);
底部:STICKLINE(CROSS(KAR4,10) AND KAR4>10,-55,-50,6,0),COLORMAGENTA;
建仓:= IF((KAR7<10),-32,-50), COLORCC00FF,LINETHICK1;
V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
M线:=EMA(V11,3)-50,COLORYELLOW,LINETHICK1;
VAR111:=LLV(LOW,100);
VAR222:=HHV(HIGH,250);
{多空彩带}
STICKLINE(VARC-VARD>0,VARC-50,VARD-50,6,1),COLOR0000FF;{多头行情显出红柱状}
STICKLINE(VARC-VARD<0,VARC-50,VARD-50,6,1),COLORFF0000;{空头行情显出绿色柱状}
DRAWICON(CROSS(VARC,VARD),VARD-50,5),COLORYELLOW;
DRAWICON(CROSS(VARD,VARC),VARD-50,6),COLORGREEN;
{RSV3:=(INDEXC-LLV(INDEXL,15))/(HHV(INDEXH,15)-LLV(INDEXL,15))*100;
大盘K:SMA(RSV3-50,6,1),COLORDD00EE;};
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=IF(BARSCOUNT(C)>=20,MA(C,20),MA(C,BARSCOUNT(C)));
MA30:=IF(BARSCOUNT(C)>=30,MA(C,30),MA(C,BARSCOUNT(C)));
MA40:=IF(BARSCOUNT(C)>=40,MA(C,40),MA(C,BARSCOUNT(C)));
MA60:=IF(BARSCOUNT(C)>=60,MA(C,60),MA(C,BARSCOUNT(C)));
MA120:=IF(BARSCOUNT(C)>=120,MA(C,120),MA(C,BARSCOUNT(C)));
MA250:=IF(BARSCOUNT(C)>=250,MA(C,250),MA(C,BARSCOUNT(C)));
{MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
MA40:=MA(CLOSE,40);
MA60:=MA(CLOSE,60);
MA120:=MA(CLOSE,120);
MA250:=MA(CLOSE,250);}
均1:=IF(MA5>MA10,0.5,0);
均2:=IF(MA10>MA20,0.5,0);
均3:=IF(MA20>MA30,0.5,0);
均4:=IF(MA30>MA60,0.5,0);
均5:=IF(MA60>MA120,0.5,0);
均6:=IF(MA120>MA250,1,0);
均7:=IF(CLOSE>MA250,2,0);
VOLUME:=V;
V5:=MA(VOLUME,N1),COLORWHITE,LINETHICK1;
V10:=MA(VOLUME,N2),COLORYELLOW,LINETHICK1;
V20:=IF(BARSCOUNT(C)>=20,MA(VOLUME,N3),MA(V,BARSCOUNT(C))),COLORGREEN,LINETHICK2;
V60:=IF(BARSCOUNT(C)>=20,MA(VOLUME,N4),MA(V,BARSCOUNT(C))),COLORGREEN,LINETHICK2;
V120:=IF(BARSCOUNT(C)>=120,MA(VOLUME,N5),MA(V,BARSCOUNT(C))),COLORMAGENTA,LINETHICK2;
{V20:=MA(VOLUME,N3),COLORGREEN,LINETHICK2;
V60:=MA(VOLUME,N4),COLORRED,LINETHICK2;
V120:=MA(VOLUME,N5),COLOR8000FF,LINETHICK2;}
量金叉:V5>V10 AND V10>V20 AND COUNT(CROSS(V10,V20),3)>0 AND V5>REF(V5,1) AND V10>REF(V10,1) AND V20>REF(V20,1) AND (V5>V120 OR VOLUME>V120) AND C>REF(C,1) AND COUNT(C>MA(C,5),5)>2 AND C>MA(C,5) AND C>MA(C,20) AND COUNT(C>MA(C,20),5)>2;
{DRAWTEXT(量金叉,VOL,'金叉'),COLORYELLOW;}
V120强:=COUNT(VOL>V120 AND (C>REF(C,1) OR C>MA(C,20)),3)>=2 OR COUNT(VOL>V120 AND (C>REF(C,1) OR C>MA(C,20)),5)>=3;
V5V10多:=V5>V10;
V10V20多:=V10>V20;
V20V120多:=V20>V120;
VOL排序:V120强*(V120强+V5V10多+V10V20多+V20V120多+均1+均2+均3+均4+均5+均6+均7),NODRAW;
VOL画线:-50+VOL排序,COLORMAGENTA;
STICKLINE(VOL排序,-50,-50+VOL排序,2,0),COLORGRAY;
STICKLINE(VOL排序>=3,-47,-50+VOL排序,2,0),COLORYELLOW;
STICKLINE(VOL排序>=4,-46,-50+VOL排序,2,0),COLORRED;
{筹码突破}
STICKLINE(C>=COST(60),48,52,2,0),COLORYELLOW;
STICKLINE(C>=COST(80),48,52,2,0),COLORRED;
STICKLINE(C<=COST(20),48,52,2,0),COLORFF77BB;
STICKLINE(C<=COST(10),48,52,2,0),COLORFF0080;
通达信指标图例
|