主图
HH1:=IF(H<REF(H,1) AND REF(H,1)<REF(H,2),REF(H,2),0);
LL1:=IF(L>REF(L,1) AND REF(L,1)>REF(L,2),REF(L,2),0);
HH2:=VALUEWHEN(HH1>0,HH1);
LL2:=VALUEWHEN(LL1>0,LL1);
K1:=IF(CLOSE>HH2,-3,IF(CLOSE<LL2,1,0));
K2:=VALUEWHEN(K1<>0,K1);
G:=IF(K2=1,HH2,LL2);
G1:=VALUEWHEN(ISLASTBAR,G);
DRAWNUMBER(L>0,G1,G1),COLORCYAN;
W1:=K2;
W2:=OPEN-CLOSE;
HT:=IF(OPEN>CLOSE,OPEN,CLOSE);
LT:=IF(OPEN<CLOSE,OPEN,CLOSE);
STICKLINE(W1=1,HIGH,HT,0,1),COLORCYAN;
STICKLINE(W1=1,LOW,LT,0,1),COLORCYAN;
STICKLINE(W1=-3,HIGH,HT,0,1),COLORRED;
STICKLINE(W1=-3,LOW,LT,0,1),COLORRED;
STICKLINE(W1>0,OPEN,CLOSE,3,1),COLORCYAN;
STICKLINE(W1<=0,OPEN,CLOSE,3,1),COLORRED;
STICKLINE(W2>0 AND W1<=0,OPEN,CLOSE,3,0),COLORRED;
STICKLINE(W2>0 AND W1>0,OPEN,CLOSE,3,0),COLORCYAN;
IF(K2=1,G,DRAWNULL),COLORGREEN,DOTLINE;
IF(K2=-3,G,DRAWNULL),COLORRED,DOTLINE;
DRAWTEXT(CROSS(W1,0),HT,'空'),COLORGREEN;
DRAWTEXT(CROSS(0,W1),LT,'多'),COLORYELLOW;
火车:DRAWTEXT(CROSS(0,W1),LT,'多'),COLORYELLOW;
八卦换手量幅图
X_1:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,X_1,0,(-1),(-1)),COLOR00C0C0;
X_2:=VOL;
X_3:=VOL/CAPITAL*100;
低换手小于2:X_3<2,NODRAW,COLORCYAN;
温换手2至5:X_3>2 AND X_3<5,NODRAW,COLORMAGENTA;
热换手5至11:X_3>5 AND X_3<11,NODRAW,COLORYELLOW;
烫换手11至17:X_3>11 AND X_3<17,NODRAW,COLORRED;
超换手大于17:X_3>17,NODRAW,COLORGREEN;
X_4:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
X_5:=IF(CLOSE>OPEN,X_4*(HIGH-LOW),IF(CLOSE<OPEN,X_4*(HIGH-OPEN+(CLOSE-LOW)),VOL/2));
X_6:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
X_7:=IF(CLOSE>OPEN,X_6*(HIGH-LOW),IF(CLOSE<OPEN,X_6*(HIGH-OPEN+(CLOSE-LOW)),VOL/2));
X_8:=X_7/VOL*100;
X_9:=IF(CLOSE>OPEN,0-X_4*(HIGH-CLOSE+(OPEN-LOW)),IF(CLOSE<OPEN,0-X_4*(HIGH-LOW),0-VOL/2));
X_10:=IF(CLOSE>OPEN,0-X_6*(HIGH-CLOSE+(OPEN-LOW)),IF(CLOSE<OPEN,0-X_6*(HIGH-LOW),0-VOL/2));
X_11:=X_10/VOL*100;
X_12:=X_7+X_10;
X_13:=X_7/ABS(X_10);
STICKLINE(X_3<2,0,VOL,2.2,0),COLORFF4400;
STICKLINE(X_3<2,0,VOL,1.8,0),COLORFF6600;
STICKLINE(X_3<2,0,VOL,1.2,0),COLORFF9900;
STICKLINE(X_3<2,0,VOL,0.6,0),COLORFFCC00;
STICKLINE(X_3<2,0,VOL,0.3,0),COLORGREEN;
STICKLINE(X_3>2 AND X_3<5,0,VOL,2.2,0),COLORFF0033;
STICKLINE(X_3>2 AND X_3<5,0,VOL,1.8,0),COLORFF0066;
STICKLINE(X_3>2 AND X_3<5,0,VOL,1.2,0),COLORFF0099;
STICKLINE(X_3>2 AND X_3<5,0,VOL,0.6,0),COLORFF00CC;
STICKLINE(X_3>2 AND X_3<5,0,VOL,0.3,0),COLORMAGENTA;
STICKLINE(X_3>5 AND X_3<11,0,VOL,2.2,0),COLOR0035FF;
STICKLINE(X_3>5 AND X_3<11,0,VOL,1.8,0),COLOR0064FF;
STICKLINE(X_3>5 AND X_3<11,0,VOL,1.3,0),COLOR0093FF;
STICKLINE(X_3>5 AND X_3<11,0,VOL,0.8,0),COLOR00C2FF;
STICKLINE(X_3>5 AND X_3<11,0,VOL,0.3,0),COLORYELLOW;
STICKLINE(X_3>11 AND X_3<17,0,VOL,2.2,0),COLOR000055;
STICKLINE(X_3>11 AND X_3<17,0,VOL,2,0),COLOR000077;
STICKLINE(X_3>11 AND X_3<17,0,VOL,1.8,0),COLOR000099;
STICKLINE(X_3>11 AND X_3<17,0,VOL,1.5,0),COLOR0000BB;
STICKLINE(X_3>11 AND X_3<17,0,VOL,0.9,0),COLOR0000DD;
STICKLINE(X_3>11 AND X_3<17,0,VOL,0.3,0),COLORRED;
STICKLINE(X_3>17,0,VOL,2.2,0),COLOR006000;
STICKLINE(X_3>17,0,VOL,2.1,0),COLOR007500;
STICKLINE(X_3>17,0,VOL,1.8,0),COLOR009100;
STICKLINE(X_3>17,0,VOL,1.3,0),COLOR00A600;
STICKLINE(X_3>17,0,VOL,0.8,0),COLOR00BB00;
STICKLINE(X_3>17,0,VOL,0.3,0),COLOR00CC00;
DRAWICON(X_3>25,VOL,37);
八卦准备关注幅图
VAR1:=MA(CLOSE,5);
VAR2:=MA(CLOSE,10);
VAR3:=MA(CLOSE,20);
VAR4:=MA(CLOSE,30);
VAR5:=(VAR1+VAR2+VAR3+VAR4)/4;
VAR6:=(VAR5-REF(VAR5,5))/REF(VAR5,5)*1500;
VAR7:=(VAR5-REF(VAR5,5))/REF(VAR5,5)*1500;
VAR8:=EMA(VAR6,8);
注意: STICKLINE(VAR6>REF(VAR6,1) AND VAR6<0 AND VAR6<VAR8,VAR6,0,2,0);
转强: STICKLINE(VAR8>REF(VAR8,1) AND VAR6<0 AND VAR6>VAR8,VAR8,0,2,0),COLORLIRED ;
持股: STICKLINE(VAR8>REF(VAR8,1) AND VAR8>0,VAR6,0,2,0),COLORRED;
观望: STICKLINE(VAR6<REF(VAR6,1) AND VAR8>REF(VAR8,1) AND VAR6>0,
VAR6,VAR8,2,0),COLORYELLOW;
持币: STICKLINE(VAR6<REF(VAR6,1) AND VAR6<VAR8,VAR6,VAR8,2,0),COLORFFFF00;
注意底部:0,COLORGREEN;
坚决持股:0,COLORRED;
谨慎观望:0,COLORYELLOW;
果断持币:0,COLORFFFF00;
趋势转强:0,COLORFFDDFF;
HLM1:=MA(HHV(H,485),17);
HLM2:=MA(HHV(H,222),17);
HLM3:=MA(HHV(H,96),17);
HLM4:=MA(LLV(L,485),17);
HLM5:=MA(LLV(L,222),17);
HLM6:=MA(LLV(L,96),17);
HLM7:=MA((HLM1*0.558+HLM2*0.558+HLM3*0.558+HLM4*0.96+HLM5*0.96+HLM6*0.96)/6,17);
HLM8:=MA((HLM1*0.55+HLM2*0.55+HLM3*0.65+HLM4*1.25+HLM5*1.23+HLM6*1.2)/6,17);
HLM9:=MA((HLM1*0.68+HLM2*0.68+HLM3*0.68+HLM4*1.3+HLM5*1.3+HLM6*1.3)/6,17);
HLM10:=MA((HLM7*3+HLM8*2+HLM9)/6*1.738,17);
HLM11:=SMA(ABS(L-REF(L,1)),3,1)/SMA(MAX(L-REF(L,1),0),3,1)*100;
HLM12:=MA(IF(C*1.35<=HLM10,HLM11*10,HLM11/10),3);
HLMH:=HHV(HLM12,30);
关注:MA(IF(L<=LLV(L,13),(HLMH+HLM11*2)/2,0),3)/200,COLOR0000FF;
DRAWTEXT(CROSS(关注,1.2),关注*0.5-6,'↑▲'),COLORFF00FF;
DRAWTEXT(CROSS(关注,4.5),关注,'抄底'),COLOR0000FF;
DRAWICON(CROSS(关注,7.0),关注*0.5-10,9);
DRAWTEXT(CROSS(关注,7.0),关注*0.5-25,'准备'),COLOR00FFFF;
八卦红色持股趋势指标
VAR2:=HHV(H,70),NODRAW;
VAR3:=HHV(H,20),NODRAW;
白龙:MA(C,125),COLORWHITE,NODRAW;
黄龙:白龙+2*STD(C,170),COLORYELLOW,NODRAW;
紫龙:白龙-2*STD(C,145),COLORMAGENTA,NODRAW;
青龙:SAR(125,1,7),COLORCYAN,NODRAW;
红龙:VAR2*0.83,COLORRED,NODRAW;
蓝龙:VAR3*0.91,COLORBLUE,NODRAW;
DRAWBAND(蓝龙,RGB(0,0,250),0,DRAWNULL);
STICKLINE(青龙>REF(青龙,1),青龙,0,18,0),COLOR000099;
STICKLINE(红龙>白龙 AND 蓝龙>白龙,青龙,白龙,0.5,0),COLORYELLOW;
NOTEXTX1:红龙,COLORRED,LINETHICK3;
NOTEXTX2:白龙,COLORWHITE,CIRCLEDOT,LINETHICK2;
NOTEXTX3:黄龙,COLORYELLOW,LINETHICK1;
NOTEXTX4:紫龙,COLORMAGENTA;
NOTEXTX5:青龙,COLORCYAN,DOTLINE;
DRAWICON(CROSS(蓝龙,青龙) AND 蓝龙>REF(蓝龙,1),青龙,25);
DRAWTEXT_FIX(C>0,0.005,0.1,0,'【用法说明】红色块持股,蓝色块持币;
蓝龙上穿青龙为买进信号(红钻)。'),COLORBROWN;
八卦出击幅图
DRAWGBK(O>C,RGB(110,35,120),RGB(0,25,50),0,'0',0);
DEA:=26;
MID:=9;
M:=1;
N:=5;
龙界分水岭:=40;
A1:=SUM(VOL,43)/CAPITAL;
A:=LLV(DMA(CLOSE,VOL/CAPITAL),120);
龙抬头:=200*(CLOSE-A)/A;
XG1:=(200*(CLOSE-A)/A)>=28;
RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
K1:=SMA(RSV,10,1);
D3:=SMA(K1,5,1);
KK:=INTPART(K1);
DD:=INTPART(D3);
TFXXS:=KK+DD;{//变异KD风险系数}
TGLD:=MOD(TFXXS,10);{//踏浪涨停概率点}
TGLXS:=(TFXXS-REF(TFXXS,1))*10>=0;
MA13:=MA(C,13);
MA21:=MA(C,21);
强势线:=(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;
LC:=REF(CLOSE,1);
CZX:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100;
ZT1:=IF(REF(C,1)*1.1-C<0.01 ,1,0);
操作线:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;
ZCX2:=45;CDX:=25;
HH:=COUNT(ZT1,N)>=1;
PP2:=CZX<ZCX2 AND REF(CZX,1)>ZCX2 AND C>MA(C,21) AND HH AND MA(C,13)>REF(MA(C,13),1);
PP3:=CZX<CDX AND REF(CZX,1)>CDX AND C>MA(C,21) AND HH AND MA(C,13)>REF(MA(C,13),1);
跌停:=(C<=DTPRICE(REF(C,1),0.1));
DT3:=COUNT(跌停,4)>0;
去除:=NOT(DT3);
XG2:=PP2 OR PP3 OR REF(PP2 OR PP3,M) AND 去除;
买线:=MA(CLOSE,9);
卖线:=MA(CLOSE,20);
BU:=CROSS(买线,卖线);
建仓:=DRAWTEXT(BU,L-0.1,'建仓');
EMA13:=EMA(C,13);
EMA34:=EMA(C,34);
EMA55:=EMA(C,55);
EMA120:=EMA(C,120);
AR1:=EMA55>EMA34 AND EMA34>EMA13;
AR2:=BARSLAST((C-EMA13)/EMA13*100<-6);
AR3:=EMA13>=REF(EMA13,2);
AR4:=COUNT(CROSS(C,EMA13),AR2)=1;
AR5:=AR1 AND AR2 AND AR3 AND AR4;
QD1:=AR5 AND FILTER(AR5,10);
ZT:=(REF(C,1)*1.095-C)<0.01 AND C=H;
QD:=QD1 AND ZT;
BR1:=COUNT(BETWEEN((C-REF(C,1))/REF(C,1)*100,0,5) ,5)=5;
BR2:=ABS((EMA13-EMA34)+(EMA34-EMA55))/C<0.2;
BR3:=C>EMA55 AND (REF(C,1)<REF(EMA55,1) OR REF(C,2)<REF(EMA55,2) OR REF(C,3)<REF(EMA55,3) OR REF(C,4)<REF(EMA55,4) OR REF(C,5)<REF(EMA55,5));
BR4:=FILTER(BR1 AND BR2 AND BR3,10);
上升:=DRAWTEXT(BR4,L-0.09,'上升');
CR1:=(C-REF(C,1))/REF(C,1)*100>0.5;
CR2:=V>MA(V,5)*0.6;
CR3:=COUNT(CROSS(EMA13,EMA55),3)=1;
CR4:=ABS(EMA34-EMA55)/EMA55<0.03;
CR5:=EMA55<=EMA120 AND EMA55>=REF(EMA55,1);
CR6:=FILTER(CR1 AND CR2 AND CR3 AND CR4 AND CR5,2);
涨升:=DRAWTEXT(CR6,L-0.09,'涨升');
DR1:=EMA13>EMA34 AND EMA34<EMA55;
DR2:=BARSLAST(CROSS(C,EMA55) );
DR3:=H=HHV(H,DR2);
DR4:=BARSLAST(DR3);
DR5:=COUNT(O>C AND C<REF(C,1) AND C>EMA55 AND BETWEEN((C-EMA55)/EMA55,0,0.02),DR4)=1;
DR6:=C>REF(C,1);
DR7:= DR1 AND DR5 AND DR6;
DR8:=DR7 AND FILTER(DR7 ,10);
出击:=DRAWTEXT(DR8,L-0.09,'出击');
ER:=BARSLAST(REF(CROSS(EMA55,EMA34),1)) AND CROSS(EMA34,EMA55);
金叉:=DRAWTEXT(ER,L-0.09,'金叉');
FR:=BARSLAST(REF(CROSS(EMA34,EMA13),1)) AND CROSS(EMA13,EMA34);
加仓:=DRAWTEXT(FR,L-0.09,'加仓');
HR2:=EMA13>=REF(EMA13,3) AND EMA34>=REF(EMA34,1) AND EMA55>=REF(EMA55,1) AND CROSS(C,EMA13) AND CROSS(C,EMA34) AND CROSS(C,EMA55);
HR3:=HR2 AND FILTER(HR2 ,10);
推进:=DRAWTEXT(HR3,L-0.3,'推进');
一字涨停:=C/REF(C,1)>1.0975 AND H=O;
HH2:=COUNT(ZT AND NOT(C/REF(C,1)>1.095 AND H=O),7)>=2;
HH3:=COUNT(TGLXS,5)>=5;
XG:=XG2 OR 建仓 OR 推进 OR 上升 OR 加仓 OR 出击 ;
XG AND HH2 AND XG1 AND HH3 AND 去除;