多空持股K线副图指标
VAR100:=1;
多线:27,NODRAW;
空线:55,NODRAW;
生命线:EMA(CLOSE,55),NODRAW;
BS:1,NODRAW;
MA7:=MA(CLOSE,1);
转强:=(6*HIGH+5*REF(HIGH,1)+4*REF(HIGH,2)+3*REF(HIGH,3)+2*REF(HIGH,4)+1*REF(HIGH,5))/(6+5+4+3+2+1);
转弱:=(6*LOW+5*REF(LOW,1)+4*REF(LOW,2)+3*REF(LOW,3)+2*REF(LOW,4)+1*REF(LOW,5))/(6+5+4+3+2+1);
BB2:=IF(CLOSE>REF(转强,1),1,IF(CLOSE<REF(转弱,1),(-1),0));
DD2:=BARSLAST(NOT(BB2=0));
B:=IF(BB2=0,REF(BB2,DD2),BB2);
中短:IF(B=(-1),MA(HIGH,6)*VAR100,MA(LOW,6));
B点持股:=BARSLASTCOUNT(MA7>中短);
S点持币:=BARSLASTCOUNT(MA7<中短);
STICKLINE(B点持股>0,O,C,3,0),COLORRED;
STICKLINE(B点持股>0,L,O,0,1),COLORRED;
STICKLINE(B点持股>0,H,C,0,1),COLORRED;
持股线:IF(B点持股>0,中短,DRAWNULL),COLORWHITE,LINETHICK2;
STICKLINE(S点持币=1,O,C,3,0),COLORBLUE;
STICKLINE(S点持币=1,L,O,0,1),COLORBLUE;
STICKLINE(S点持币=1,H,C,0,1),COLORBLUE;
DRAWICON(B点持股=1,中短,5);
DRAWICON(S点持币=1,中短,6);