DRAWGBK(v>1,colorRGB(10,150,0),colorRGB(10,10,0),70);
DRAWTEXT((SYSPARAM(2) = BARPOS),CLOSE,('版块:' + BLKNAME)),ALIGN4;
BB:=BARPOS=SYSPARAM(1);
variable:wday[7]='星期六';
wday[1]:='星期日';
wday[2]:='星期一';
wday[3]:='星期二';
wday[4]:='星期三';
wday[5]:='星期四';
wday[6]:='星期五';
fy:=year;
fm:=month;
fd:=day;
wd:=weekday;
p:=sysparam(1);
str1:='今天是:'+numtostr(fy[p],0)+'年'+numtostr(fm[p],0)+'月'
+numtostr(fd[p],0)+'日, '+wday[wd[p]+1];
explain(barpos=p,str1),colorRED;
DRAWTEXT(barpos=p,H*1.12,str1),ALIGN2,coloryellow,;
DRAWTEXT(sysparam(2)=BARPOS,c,
'收益:'+ NUMTOSTR(FINANCE(33),2)+'\n'
+'净资:'+NUMTOSTR(FINANCE(34),2 )+'\n'
+'流通:'+ NUMTOSTR(FINANCE(7)/10000,2)+'亿'+'\n'
+'流通:'+NUMTOSTR(FINANCE(7)/FINANCE(1)*100 ,0)+' %'+'\n'
+'权益:'+NUMTOSTR(FINANCE(36),0 )+' %'+'\n'
+'主营:'+NUMTOSTR(FINANCE(53),0 )+' %'+'\n'
+'利润:'+NUMTOSTR(FINANCE(54),0 )+' %'+'\n'
+'主营:'+NUMTOSTR(FINANCE(20)/10000,1 )+'亿'+'\n'
),COLORccffcc,ALIGN4;
v1:ema(close,5);
v2:ema(ema(close,90)*1.01,10),;
DRAWTEXT(cross(v1,v2),v1+0.05,'追牛'),color00ff00,LINETHICK2;
VAR1:=LLV(LOW,21);
VAR2:=HHV(HIGH,21);
AK1:=EMA((((CLOSE - VAR1) / (VAR2 - VAR1)) * 100),5);
AK:=EMA((((CLOSE - VAR1) / (VAR2 - VAR1)) * 50),13);
AB:=CROSS(AK1,AK);
DRAWICON(cross(v1,v2),v2,1);
DRAWTEXT((AB = 1),(LOW * 0.99),'○牛窝'),colorYELLOW;
M5:MA(CLOSE,5),LINETHICK1,colorYELLOW;
M13:MA(CLOSE,13),LINETHICK2,color0099ff;
A:MA(CLOSE,3),ColorFF00FF,LINETHICK0;
A1:=(CLOSE+HIGH+LOW)/(3);
B:=EMA(A1,10);
B2:=REF(B,1);
MA20:=EMA(CLOSE,20);
DRAWTEXT((B>B2),ma20,'*'),COLORMAGENTA;
DRAWTEXT((B<B2),ma20,'*'),Coloryellow;
{以下设置逃顶指标}
varC:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100;
DRAWICON(CROSS(82,varC),HIGH,2);
var6:=REF(C,1);
var7:=SMA(MAX(C-var6,0),6,1)/SMA(ABS(C-var6),6,1)*100;
DRAWTEXT(CROSS(84,var7),H*1.01,'▲逃顶'),COLORGREEN ;
{追涨}
Var32:=CLOSE/REF(CLOSE, 1)>=1.062 AND HIGH/CLOSE<1.005 AND MA(CLOSE, 90)/CLOSE>=1.150;
Var33:=Var32 AND COUNT(Var32, 20)=1 ;
Var34:=(INDEXC-REF(INDEXC, 1))/REF(INDEXC, 1);
Var35:=(CLOSE-REF(CLOSE, 1))/REF(CLOSE, 1);
Var36:=IF(Var34>0.010, 0.900, 1) AND IF(Var34>(-0.025), 1, 1.200);
Var37:=Var36*(Var35-Var34)*100;
Var38:=SUM(Var37, 10);
Var39:=SMA(Var38, 40, 1);
Var310:=Var38>20;
Var311:=CROSS(CLOSE, MA(CLOSE*1.055, 3)) AND CLOSE>OPEN*1.060 AND VOL>=REF(VOL, 1)*1.5 AND CLOSE>=MA(CLOSE, 10);
Var312:=Var310 AND Var311 ;
Var313:=(-100)*(HHV(HIGH, 3)-CLOSE)/(HHV(HIGH, 3)-LLV(LOW, 3));
Var314:= CROSS(Var313, (-87)) AND OPEN=1.090*REF(CLOSE, 1) AND INDEXC>0.980*REF(INDEXC, 1) AND CLOSE<=1.470*LLV(CLOSE, 58);
Var315:=EMA(CLOSE, 12)-EMA(CLOSE, 26);
Var316:=EMA(Var315, 9);
Var317:=2*(Var315-Var316);
Var318:=(CLOSE-LLV(LOW, 9))/(HHV(HIGH, 9)-LLV(LOW, 9))*100;
Var319:=SMA(Var318, 3, 1);
Var320:=SMA(Var319, 3, 1);
Var321:=EMA(IF(Var316>REF(Var316, 1), 1, (-1)), 14)*14;
Var322:=EMA(IF(Var320>REF(Var320, 1), 1, (-1)), 14)*14*2;
Var323:=(MA(CLOSE, 5)/MA(CLOSE, 70)-1)*100;
Var324:=(Var323+Var322+Var321)/3;
Var325:=MA(CLOSE, 80)-MA(CLOSE, 10)/3;
Var326:=IF(CLOSE and MA(VOL, 5)/240 AND CLOSE>REF(CLOSE, 1)*1.0 AND CLOSE,88,0);{Var38>Var39;}
Var327:=IF(CLOSE/REF(CLOSE, 1)>1.050 AND VOL/CAPITAL*100<10 AND CLOSE<17 AND HIGH/CLOSE<1.010 AND Var326>0, 91, 0);
Var328:=IF(Var324>REF(Var324, 1) AND REF(Var324, 1)<REF(Var324, 2) AND (Var33 OR Var312 OR Var314) OR Var326>0 OR Var327>0, 85, 0);
Var329:=IF(Var327>0 ,95,0), STICK,LINETHICK2;
Var330:=IF(Var326>0 or var327>0,91,0), STICK,LINETHICK2;
Var331:=IF(Var328>0 or var327>0 or var326>0,88,0), STICK,LINETHICK2;
Var332:=100*(CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42)),LINETHICK1,colorgreen;
Var333:=COUNT(MA(CLOSE,3)>REF(MA(CLOSE,3),1),1)=1;
Var334:=(Var332<93 AND Var333 and MAX(MAX(Var329, Var330), Var331))*100;
STICKLINE(Var327>90,LOW*0.99,LOW*0.95,2,0),COLORYELLOW;
DRAWTEXT(Var327>90,LOW*0.95,'追涨'),COLORYELLOW;
DRAWICON(Var310>0 AND Var327=0,HIGH*1.01,5);
{阴柱}
STICKLINE(OPEN>=CLOSE ,HIGH ,LOW,0.2,0 ),COLORFFCC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),ColorFF9F68;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLORff9900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLORffaa11;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLORffbb11;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLORffcc22;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORffdd22;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORffee33;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLORffff33;
{红柱}
STICKLINE(CLOSE>OPEN,HIGH,LOW,0.2,0) ,COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0) ,COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR3300CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR0033CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR6633CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR3333FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR6633FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR3366FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR6666FF;