主图指标
DRAWBAND(COST(70),RGB(80,0,80),COST(90),RGB(88,8,240));
DRAWBAND(COST(50),RGB(80,60,80),COST(70),RGB(88,68,240));
DRAWBAND(COST(30),RGB(80,120,80),COST(50),RGB(88,128,240));
DRAWBAND(COST(10),RGB(80,190,80),COST(30),RGB(88,188,240));
{彩色K线}
TYX3:=MA(REF(HHV((C+L+O+H)/4,30),1),3);
TYX4:=MA((C+L+O+H)/4,13);
TYX5:=EMA((C+L+O+H)/4,21);
{空心红}
STICKLINE(C<TYX5 AND C>O,H,L,0,0),COLORRED;
STICKLINE(C<TYX5 AND C>O,C,O,3,1),COLORRED;
{深绿}
STICKLINE(C<TYX5 AND C<O,H,L,0,0),COLOR007700;
STICKLINE(C<TYX5 AND C<O,C,O,3,0),COLOR005500;
STICKLINE(C<TYX5 AND C<O,C,O,2,0),COLOR006600;
STICKLINE(C<TYX5 AND C<O,C,O,1,0),COLOR007700;
{蓝}
STICKLINE(C>TYX5 AND C<O,H,L,0,0),COLORFFDD44;
STICKLINE(C>TYX5 AND C<O,C,O,3,0 ),COLORFF7700;
STICKLINE(C>TYX5 AND C<O,C,O,2,0 ),COLORFFAA22;
STICKLINE(C>TYX5 AND C<O,C,O,1 ,0 ),COLORFFDD44;
{黄}
STICKLINE(C>TYX5 AND C>O,H,L,0,0 ),COLOR00EEFF;
STICKLINE(C>TYX5 AND C>O,C,O,3,0 ),COLOR00AAFF;
STICKLINE(C>TYX5 AND C>O,C,O,2,0 ),COLOR00CCFF;
STICKLINE(C>TYX5 AND C>O,C,O,1,0 ),COLOR00EEFF;
{粉红}
STICKLINE(C>TYX4 AND C>O,H,L,0,0),COLORFF66AA;
STICKLINE(C>TYX4 AND C>O,C,O,3,0 ),COLORFF11FF;
STICKLINE(C>TYX4 AND C>O,C,O,2,0 ),COLORFF44FF;
STICKLINE(C>TYX4 AND C>O,C,O,1,0 ),COLORFF66FF;
{亮灰}
STICKLINE(C>TYX4 AND C<O,H,L,0,0),COLOR999999;
STICKLINE(C>TYX4 AND C<O,C,O,3,0),COLOR555555;
STICKLINE(C>TYX4 AND C<O,C,O,2,0),COLOR777777;
STICKLINE(C>TYX4 AND C<O,C,O,1,0),COLOR999999;
{深红}
STICKLINE(C>TYX3 AND C>O,H,L,0,0),COLOR0000DD;
STICKLINE(C>TYX3 AND C>O,C,O,3,0),COLOR000099;
STICKLINE(C>TYX3 AND C>O,C,O,2,0),COLOR0000BB;
STICKLINE(C>TYX3 AND C>O,C,O,1,0),COLOR0000DD;
{涨跌停K线}
STICKLINE((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),OPEN,CLOSE,1,0),COLORYELLOW;
STICKLINE((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),OPEN,CLOSE,1,0),COLORWHITE;
{突破}
STICKLINE(REF(COUNT(C<TYX3,5)=5,1) AND C>TYX3 AND C>O,C,O,1,0),COLOR00CCFF;
STICKLINE(REF(COUNT(C<TYX3,5)=5,1) AND C>TYX3 AND C>O,C,O,1,0),COLOR00CCFF;
A1:=CLOSE*VOL;
A2:=EMA((EMA(A1,3)/EMA(VOL,3)+EMA(A1,6)/EMA(VOL,6)+EMA(A1,12)/EMA(VOL,12)+EMA(A1,24)/EMA(VOL,24))/4,13);
A3:=1.06*A2;
A4:=EMA(A3-(EMA(CLOSE,3)-A3),5);
AAK:IF(A4<=A3,A4,A3),COLORYELLOW,LINETHICK2;
A5:=2*A3-AAK;
AAA:IF(A5>=A3,A5,A3),COLORYELLOW,LINETHICK2;
观望:IF(AAK=AAA,AAK,DRAWNULL),COLORGREEN,LINETHICK2;
趋势:=3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2*
SMA(SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1);
ZZ:=趋势>REF(趋势,1);
K1:=VOL/1000000;
K2:=CLOSE;
V1:=EMA(K1,5);
V2:=EMA(K2,5);
价异动:=K2>REF(V2,1)*1.06;
量异动:=K1>REF(V1,1)*1.6&&ZZ;
停牌:=DYNAINFO(17)>0;
MK1:=SUM(价异动,2)>0 AND 停牌;
MK2:=SUM(量异动,2)>0 AND REF(趋势,1)<89;
共鸣:=( C>REF(C,1) AND FILTER(MK1 AND MK2,3))*6,COLORRED;
XGP:=AAK=AAA AND 共鸣;
DRAWICON(XGP,O*1.01,10);
DRAWTEXT(XGP,O*1.01,' ←突破顶,'),COLORYELLOW;
副图1
昨收:=REF(C,1);
最高价偏离:=ABS(H-昨收);
最低价偏离:=ABS(L-昨收);
高低偏离:=ABS(H-REF(L,1));
昨K线长:=ABS(昨收-REF(O,1));
稳定性测度:=IF(最低价偏离>高低偏离 AND 最低价偏离>最高价偏离,最低价偏离+最高价偏离/2+昨K线长/4,高低偏离+昨K线长/4);
强弱测度:=C+(C-O)/2-REF(C,1);
振动系数:=强弱测度/稳定性测度;
振动量:=振动系数*MAX(最高价偏离,最低价偏离);
振动线:=SUM(振动量,0);
均125:=EMA(振动线,125);
XX:振动线>均125,COLORFF00FF, NODRAW;
均240:=EMA(振动线,240);
擒牛龙虎:FILTER(CROSS(振动线,均240),24),LINETHICK0,COLORYELLOW,NODRAW;
DRAWICON(擒牛龙虎,均125-0.10,9);
龙虎:均125>=REF(均125,1),COLORRED,NODRAW;
IF(龙虎,均125,DRAWNULL),COLORRED,LINETHICK2;
{IF(C,均125,DRAWNULL),COLOR004F00,LINETHICK1;}
STICKLINE(NOT(擒牛龙虎),均125,振动线+(均125-振动线)*0.75,5,0),COLOR004F00;
STICKLINE(NOT(擒牛龙虎),振动线+(均125-振动线)*0.75,振动线+(均125-振动线)*0.5,5,0),COLOR007600;
STICKLINE(NOT(擒牛龙虎),振动线+(均125-振动线)*0.5,振动线+(均125-振动线)*0.25,5,0),COLOR00AD00;
STICKLINE(NOT(擒牛龙虎),振动线,振动线+(均125-振动线)*0.25,5,0),COLOR00DE00;
STICKLINE(擒牛龙虎,均125,均125+(振动线-均125)*0.25,5,0),COLORFA00FF;
STICKLINE(擒牛龙虎,均125+(振动线-均125)*0.25,均125+(振动线-均125)*0.5,8,0),COLORFA50FF,LINETHICK3;
STICKLINE(擒牛龙虎,均125+(振动线-均125)*0.5,均125+(振动线-均125)*0.75,8,0),COLORFA93FF,LINETHICK3;
STICKLINE(擒牛龙虎,振动线,均125+(振动线-均125)*0.75,8,0),COLORFFCCFF;
均150:=EMA(振动线,150);
{IF(C,均150,DRAWNULL),COLOR88BBBB;}
均175:=EMA(振动线,175);
IF(C,均175,DRAWNULL),COLORFFCC00;
均200:=EMA(振动线,200);
IF(C,均200,DRAWNULL),COLOR777777;
均225:=EMA(振动线,225);
IF(C,均225,DRAWNULL),COLORBBBBBB;
副图2
BS1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
BS2:=LLV(LOW,34);
BS3:=HHV(HIGH,34);
K:=EMA((BS1-BS2)/(BS3-BS2)*100,13);
D:=EMA(K,5);
走势:D;
BSVAR1:=HHV(HIGH,9)-LLV(LOW,9);
BSVAR2:=HHV(HIGH,9)-CLOSE;
BSVAR3:=CLOSE-LLV(LOW,9);
BSVAR4:=BSVAR2/BSVAR1*100-70;
BSVAR5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
BSVAR6:=(2*CLOSE+HIGH+LOW)/4;
BSVAR7:=SMA(BSVAR3/BSVAR1*100,3,1);
BSVAR8:=LLV(LOW,34);
BSVAR9:=SMA(BSVAR7,3,1)-SMA(BSVAR4,9,1);
BSVAR10:=IF(BSVAR9>100,BSVAR9-100,0);
BSVAR11:=HHV(HIGH,34);
BSVAR12:=EMA((BSVAR6-BSVAR8)/(BSVAR11-BSVAR8)*100,13);
BSVAR13:=EMA(0.667*REF(BSVAR12,1)+0.333*BSVAR12,2);
底部区间:=CROSS(BSVAR12,BSVAR13) AND BSVAR12>BSVAR13 AND BSVAR12<18;
BSA:=EMA(HIGH,30)*1.15;
BSB:=REF(BSA,1);
BSC:=EMA(LOW,3)*0.99;
BSD:=EMA(LOW,33)*0.88;
激进:=CROSS(BSA,BSC),COLORYELLOW;
搏:=CROSS(BSD,BSC) AND C<O;
STICKLINE(搏,0,50,3,0),COLORRED;
DRAWTEXT(搏,50,'<--搏'),COLORRED;
副图3
{人气指标}
VAR1:=CLOSE-LLV(L,9);
VAR2:=HHV(H,9)-LLV(L,9);{WWW.GPXIAZAI.COM}
VAR3:=(VAR1+0.0001)/VAR2*100;
人气:EMA(EMA(VAR3,5),3),LINETHICK3,COLORGRAY;
DRAWBAND(50,RGB(135,175,0),人气,RGB(190,50,50));