AAA:=(3*C+H+L+O)/6;
VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;
VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;
VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;
VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;
VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
短线:=VAR1,COLORMAGENTA,LINETHICK2;
中线:=VAR6,COLORCYAN,LINETHICK2;
长线:=EMA(((SLOPE(CLOSE,21) * 20) + CLOSE),42),LINETHICK2,NODRAW,COLORGREEN;
{持股持币彩色K线}
EMA2:=EMA(CLOSE,2);
BBUY:=CROSS(EMA2,长线);
SEL:=CROSS(长线,EMA2);
STICKLINE((EMA2 >= 长线),LOW,HIGH,0.4,0),COLOR0000FF;
STICKLINE((EMA2 >= 长线),CLOSE,OPEN,3,1),COLOR000077;
STICKLINE((EMA2 >= 长线),CLOSE,OPEN,2.6,1),COLOR000099;
STICKLINE((EMA2 >= 长线),CLOSE,OPEN,2,1),COLOR0000BB;
STICKLINE((EMA2 >= 长线),CLOSE,OPEN,1.3,1),COLOR0000DD;
STICKLINE((EMA2 >= 长线),CLOSE,OPEN,0.4,1),COLOR0000FF;
STICKLINE((EMA2 < 长线),LOW,HIGH,0.4,0),COLORFFFF00;
STICKLINE((EMA2 < 长线),CLOSE,OPEN,3,1),COLOR777700;
STICKLINE((EMA2 < 长线),CLOSE,OPEN,2.6,1),COLOR999900;
STICKLINE((EMA2 < 长线),CLOSE,OPEN,2,1),COLORBBBB00;
STICKLINE((EMA2 < 长线),CLOSE,OPEN,1.3,1),COLORDDDD00;
STICKLINE((EMA2 < 长线),CLOSE,OPEN,0.4,1),COLORFFFF00;
STICKLINE((CROSS(EMA2,长线) OR CROSS(长线,EMA2)),OPEN,CLOSE,5,0),COLOR0055FF;
STICKLINE((CROSS(EMA2,长线) OR CROSS(长线,EMA2)),OPEN,CLOSE,4.2,0),COLOR0077FF;
STICKLINE((CROSS(EMA2,长线) OR CROSS(长线,EMA2)),OPEN,CLOSE,3,0),COLOR0099FF;
STICKLINE((CROSS(EMA2,长线) OR CROSS(长线,EMA2)),OPEN,CLOSE,2.2,0),COLOR00BBFF;
STICKLINE((CROSS(EMA2,长线) OR CROSS(长线,EMA2)),OPEN,CLOSE,1.5,0),COLOR00DDFF;
STICKLINE((CROSS(EMA2,长线) OR CROSS(长线,EMA2)),OPEN,CLOSE,0.4,0),COLOR00FFFF;
VAR3TD:=100-3*SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1),15,1);
VAR4TD:=100-3*SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1),15,1);
VAR2TD:=VAR3TD<REF(VAR4TD,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(VAR2TD AND COUNT(VAR2TD,30)=1,L,'大资金进场'),COLORFF00FF;
VAR3AA:=IF((CLOSE>REF(CLOSE,1)),78,0);
VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3AA>0),91,0);
DRAWTEXT(FILTER((VAR4AA>90),45),(LOW),'★大胆搏 '),COLOR00FFFF;
DRAWTEXT(CROSS(EMA(((SLOPE(CLOSE,40)*20)+CLOSE),20),EMA(CLOSE,3)),(HIGH
* 1.05),'卖'),LINETHICK3,COLORFFFFFF;