短线加仓选股:=REF(CLOSE,1);{股票公式-股票指标www.gs6699.com}
指标公式:=SMA(MAX(CLOSE-短线加仓选股,0),7,1)/SMA(ABS(CLOSE-短线加仓选股),7,1)*100;
RSI4:=SMA(指标公式,7,1);
HH:=BARSLAST(指标公式<=15)<5;
vvddd1:=SMA(指标公式,7,1);
vvddd2:=CROSS(指标公式,RSI4) AND vvddd1>15 AND HH;
BU:=vvddd2;
BB2:=IF(C>REF((6*H+5*REF(H,1)+4*REF(H,2)+3*REF(H,3)+2*REF(H,4)+1*REF(H,5))/(6+5+4+3+2+1),1),1,IF(C<REF((6*L+5*REF(L,1)+4*REF(L,2)+3*REF(L,3)+2*REF(L,4)+1*REF(L,5))/(6+5+4+3+2+1),1),-1,0));
DD2:=BARSLAST(NOT(BB2=0));
B:=IF(BB2=0,REF(BB2,DD2),BB2);
vvddd3:BU,NODRAW,COLORRED;
vvddd4:C<REF(O,BARSLAST(BU>0)) AND COUNT(C<REF(O,BARSLAST(BU>0)),BARSLAST(BU>0))=1 AND IF(MA(CLOSE,1)>IF(B=-1,MA(HIGH,6),MA(LOW,6)) ,1,-1)>0,NODRAW, COLORGREEN;
vvddd5:(H/REF(C,BARSLAST(BU>0))>=1.05 OR C/REF(C,BARSLAST(BU>0))>=1.05) AND COUNT(vvddd4,BARSLAST(BU>0))=0 AND COUNT(CROSS(0,IF(MA(CLOSE,1)>IF(B=-1,MA(HIGH,6),MA(LOW,6)) ,1,-1)),BARSLAST(BU>0))=0,NODRAW, COLORBLUE;
vvddd6:COUNT(BU,BARSLAST(BU)+1)=1 AND COUNT(vvddd4,BARSLAST(BU>0)+1)=0 AND COUNT(CROSS(0,IF(MA(CLOSE,1)>IF(B=-1,MA(HIGH,6),MA(LOW,6)) ,1,-1)), BARSLAST(BU>0)+1)=0,NODRAW,COLOR696960;
vvddd8:(COUNT(BU,BARSLAST(BU)+1)=1 AND COUNT(vvddd4,BARSLAST(BU>0)+1)=0 AND COUNT(CROSS(0,IF(MA(CLOSE,1)>IF(B=-1,MA(HIGH,6),MA(LOW,6)) ,1,-1)), BARSLAST(BU>0)+1)=1 AND CROSS(0,IF(MA(CLOSE,1)>IF(B=-1,MA(HIGH,6),MA(LOW,6)) ,1,-1))) OR vvddd4,NODRAW, COLORGREEN;
STICKLINE(vvddd3>0,0,1,4,0),COLORRED;
STICKLINE(vvddd5>0 ,0.3,0.6,4,0) COLORBLUE;
STICKLINE(vvddd8>0,0,1,4,0) COLORGREEN;
TS:=BARSLASTCOUNT(vvddd5>0);
DRAWTEXT(vvddd5>0,0.5,VAR2STR(TS,0));