通达信地狱抓涨停主图指标(源码)
{使用说明:地狱线是大盘底线,击破未有效反弹,即进入熊市。现今大盘还未进入黄色上升区间,停留在蓝色下行震荡区间,请谨慎投资!}
{涨停K线}
C2:=REF(C,1);
涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(涨停,OPEN,CLOSE,-1,1),COLORRED;
STICKLINE(涨停,H,O,0.5,0),COLORYELLOW;
{最佳套利部分}
JJ:=(CLOSE+HIGH+LOW)/3;
A:=EMA(JJ,10);
B:=REF(A,1);
DRAWBAND(A,RGB(255,150,0),B,RGB(0,0,190));
{主力成本}
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+
14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210;
主力成本:EMA(X,13),NODRAW;
{均线系统部分}
M3:MA(C,3),COLORWHITE;
M5:MA(C,5),COLORYELLOW;
M10:MA(C,10),COLORMAGENTA,NODRAW;
M20:MA(C,20),COLORLIBLUE,NODRAW;
M30:MA(C,30),COLORGREEN,LINETHICK2;
M60:MA(C,60),COLORGRAY,NODRAW;
{黄金线部分}
VAR1:=V>REF(V,1)*2 AND C>=O;
黄金柱:=REF(VAR1,3) AND COUNT(C>REF(C,3),3)=3
AND V<REF(V,3) AND REF(V,1)<REF(V,3) AND REF(V,2)<REF(V,3);
DRAWTEXT(黄金柱,
LLV(LOW,3),"黄—————黄金线—————"),COLORMAGENTA;
{起涨点}
A1:=M5>=M10 AND M5/REF(M5,1)>1 ;
A2:=M10>=M20 AND M10/REF(M10,1)>1;
A3:= M20/REF(M20,1)>1;
A4:=M30/REF(M30,1)>1 AND REF(M30,1)/REF(M30,2)>1
AND COUNT( M30/REF(M30,1)>1,30)<=28;
K1:=C/REF(C,1)>=1.02 OR (OPEN>CLOSE AND OPEN>REF(C,1) AND C/REF(C,1)>=1.02);
V1:=V/REF(V,1)>=1.9 OR V=HHV(V,5);
H1:=HHV(H,21);
C1:=HHV(C,21);
H2:= H=H1 OR H>C1;
WBB:=COUNT(REF(C/REF(C,1)>=1.097,1),10)=0;
AAA:=A1 AND A2 AND A3 AND A4 AND K1 AND V1 AND H2 AND WBB;
STICKLINE(AAA ,OPEN,CLOSE,-1,0),COLORRED;
STICKLINE(涨停 AND AAA,OPEN,CLOSE,-1,0),COLORRED;
STICKLINE(涨停,H,O,0.5,0),COLORYELLOW;
{备注:1、图上红色实芯K线代表起涨点,
从底部起来第一个红色实芯K线为准,
其后出现的可以视而不见。
2、如果出现红色实芯K线处于左侧(大于21日)高点下方附近时,将视为无效。
但如果随后即在该高点上方再度出现信号时,该信号视为有效。}
{抓涨停部分}
ZRGK:=REF(OPEN,1)>=REF(M3,1) AND
REF(OPEN,1)>REF(M5,1) AND
REF(OPEN,1)>REF(M10,1) AND
REF(OPEN,1)>REF(M20,1) AND
REF(OPEN,1)>REF(M30,1) ;
ZRDS:=REF(C,1)<REF(M3,1) OR
REF(C,1)<REF(M5,1) OR
REF(C,1)<REF(M10,1)OR
REF(C,1)<REF(M20,1) OR
REF(C,1)<REF(M30,1) ;
ZK:=REF(OPEN,1)>REF(CLOSE,1);
JRKP:=O<M3 OR O<M5 OR O<M10 OR O<M20 OR O<M30 ;
JRSP:=C<=M3 OR C<M5 OR C<M10 OR C<M20 OR C<M30 ;
JCJL:=V<REF(V,1) OR V<=MA(V,5);
FJZT:=ZRGK AND ZRDS AND ZK AND JRKP AND JRSP AND JCJL;
今K:=C>OPEN AND C>M3 AND C> M5 AND C>M10 AND C>M20 AND C>M30;
今量:= V>=REF(V,1)*1.8;
今量1:= V>=REF(V,1)*0.9;
抓涨停:=REF(FJZT,1) OR REF(FJZT,2) OR REF(FJZT,3)
AND 今K ;
DRAWTEXT((抓涨停 AND 今量 AND (C/REF(C,1))>=1.05)
OR (HOUR>=9.30 AND HOUR<=11.30 AND 抓涨停 AND 今量1 AND (C/REF(C,1))>=1.05),
LOW*0.96,"↖抓涨停"),COLORRED;
DRAWTEXT(REF(抓涨停,1) AND 今量 AND (C/REF(C,1))>=1.05 AND 今量 ,LOW*0.96,"↖抓涨停"),COLORRED;
{MACD部分}
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
ZB:=MACD>0 AND MACD/REF(MACD,1)>1 AND DIF>REF(DIF,1);
{形态部分一}
YX:=C>REF(C,1);
JX:=C>AMOUNT/VOL/100;{均价}
SYX:=(HIGH-CLOSE)/(CLOSE-OPEN)<=1/3;
SMX:=M30/REF(M30,1)>1;
VOL1:=V>REF(V,1)*1.9;
强买:=YX AND JX AND SYX AND VOL1 AND ZB AND A>B;
DRAWTEXT(强买 AND (IF(抓涨停,0,1)) AND (IF(REF(抓涨停,1),0,1)),LOW*0.98,"↖强买"),COLORRED;
{形态部分二}
ZK1:= REF(C,1)<REF(MA(C,3),1) OR REF(C,1)<REF(MA(C,5),1)
OR REF(C,1)<REF(MA(C,10),1)
OR REF(C,1)<REF(MA(C,20),1) OR REF(C,1)<REF(MA(C,30),1);
JK1:=C>OPEN AND C>REF(C,1) AND C>MA(C,3) AND C>MA(C,5)
AND C>MA(C,10) AND C>MA(C,20 )AND C>MA(C,30 );
半仓:=A>B AND REF(A,1)<REF(B,1) AND ZK1 AND JK1;
DRAWTEXT(半仓 AND (IF(强买,0,1)) AND (IF(抓涨停,0,1))
,LOW*0.98,"↖半仓"),COLORMAGENTA;
DRAWTEXT(V>REF(V,1)*1.9 AND C>OPEN,C,"————————");
一穿三:=M20>O AND M5>O AND M10>O AND M5<C AND M10<C AND M20<C AND CLOSE>OPEN ;
DRAWTEXT(一穿三,L-0.012,"↖一穿三"),COLORFF00FF;
DRAWTEXT((H-C)/REF(C,1)>0.03 AND H=HHV(H,21),H*0.98,"止赢"),COLORWHITE;
地狱线:MA(CLOSE,321),COLORBLUE,LINETHICK2;
- 上一篇公式:通达信连续一字板选股指标(源码)
- 下一篇公式:通达信低位标注及强支撑线主图指标(源码)