N:=13;
VAR2:=CLOSE*VOL;
VAR3:=EMA((EXPMA(VAR2,3)/EXPMA(VOL,3)+EXPMA(VAR2,6)/EXPMA(VOL,6)+EXPMA(VAR2,12)/EXPMA(VOL,12)
+EXPMA(VAR2,24)/EXPMA(VOL,24))/4,N);
SUP:1.06*VAR3;
SDN:VAR3*0.94;
MA9:=EMA(CLOSE,9);
LUP:EXPMA(MA9*1.14,5);
LDN:EXPMA(MA9*0.86,5);
XG:=CLOSE>LUP AND C>REF(C,1)*(1+9.96/100) AND C=H;
DRAWTEXT (XG,HIGH*1.02,'<-小心'),COLORYELLOW;
STICKLINE(XG,OPEN,CLOSE,1,0),COLORYELLOW;
{ 爱约股_通达信股票指标公式}
AAA2:=SUM(IF( CLOSE>REF(CLOSE,1),VOL*C,0),0);
AAA3:=SUM(IF( CLOSE<REF(CLOSE,1),VOL*C,0),0);
AAA4:=SUM(IF( CLOSE=REF(CLOSE,1),VOL*C,0),0);
BB1:=0;
B1万元:=DVOL*DCLOSE/100;
B1差:=B1万元-REF(B1万元,1);
B2万元:=DVOL*DCLOSE/100;
B2比:=B2万元/REF(B2万元,1);
净流入万元:=(AAA2-AAA3-0.5*AAA4);
PM:=MA(净流入万元,1);
PMA:=PM/REF(PM,1)>1;
PMB:=REF(PMA,1)<1 AND PMA;
密码:=(EMA(MA(B1万元,2),2))/100000,COLORYELLOW,NODRAW;
二日比:=密码/REF(密码,1);
选股:=PMB AND 密码>REF(密码,1) AND 二日比>1 ,COLORRED,NODRAW;
AMV0:=VOL*(O+C)/2;
生命线:=SUM(AMV0,88)/SUM(VOL,88),COLORFF00FF,LINETHICK2;
CG:=MA(C,17),COLORFFCC66,LINETHICK2;
FL:=HHV(CG,2);
持股线:=HHV(CG,2),COLOR00FF00;
FS:=CG-(FL-CG),COLORYELLOW,LINETHICK2;
MA3:=MA(C,3),COLORGRAY;
MA13:=MA(C,13),COLORRED;
信号:=COUNT(REF(EMA(C,3),1)<REF(EMA(C,3),2),5)=5
AND EMA(C,3)>REF(EMA(C,3),1) AND 选股;
DRAWICON(信号,L*0.98,26);
DRAWTEXT (信号,L*0.98,'<--抓牛底'),COLORYELLOW;