主图指标
REFDATE(CLOSE,DATE),DOTLINE,COLOR4080FF;
REFDATE(O,DATE),POINTDOT,COLORGRAY;
VAR2:=(2*CLOSE+HIGH+LOW)/4;
VAR4:=LLV(LOW,5);
VAR3:=HHV(HIGH,4);
VAR5:=EMA((VAR2-VAR4)/(VAR3-VAR4)*100,4);
VAR6:=EMA(0.667*REF(VAR5,1)+0.333*VAR5,2);
XG:=CROSS(VAR5,VAR6) AND VAR5<30;
XG0:=CROSS(VAR6,VAR5) AND VAR5>70;
TS:=BARSLAST(BARSLASTCOUNT(XG)=1);
A2:=REF(L,TS);
A3:=BETWEEN(TS,2,10);
TS0:=BARSLAST(BARSLASTCOUNT(XG0)=1);
A0:=REF(H,TS0);
DRAWSL(XG,L,0,50,0),COLORFF00FF;
DRAWSL(XG0,H,0,50,0),COLOR008000;
DRAWICON(XG0,H*1.01,8);
DRAWICON(XG0,H,2);
DRAWICON(XG,L*0.97,7);
DRAWICON(XG,L,1);
DRAWICON(REF(C,1)/A2<1 AND C/A2>1,L*0.91,23);
DRAWICON(REF(C,1)/A2>1 AND C/A2<1,H,39);
DRAWICON(REF(C,1)/A0<1 AND C/A0>1,L*0.96,9);
DRAWICON(REF(C,1)/A0>1 AND C/A0<1,H,37);
MA10:=MA(CLOSE,10),COLORYELLOW,LINETHICK0;
MA54:=MA(CLOSE,54),COLORFFCCCC,LINETHICK0;
PL1:=(((CLOSE - MA54) / MA54) < 0.1);
PL2:=(((CLOSE - MA10) / MA10) < 0.3);
偏离率:=(((PL1 = 1) AND (PL2 = 1)) * 0.2);
平台突破:=((((偏离率 = 0) AND (REF(偏离率,1) = 0.2)) AND (REF((COUNT((偏离率 = 0.2),10) = 10),1) = 1)) * 1);
阶梯1:=VALUEWHEN(平台突破,O),DOTLINE,COLOR00FF00;
DRAWTEXT(平台突破,O,'--------------------------------------------------------------------------------------------------------------------------'),COLOR00FF00;
VAR7:=CLOSE-REF(CLOSE,5);
VAR8:=EMA(EMA(VAR7,5),5)/EMA(EMA(ABS(VAR7),5),5);
VAR9:=EMA(EMA(VAR7,20),20)/EMA(EMA(ABS(VAR7),20),20);
VAR15:=EMA(CLOSE,2);
VAR16:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
VAR10:=(L+H+C*2)/4;
VAR11:=EMA(VAR10,14),COLOR0000FF,LINETHICK2;
九转:=BARSLASTCOUNT(C<REF(C,4))>=8;
承压1:=REF(H,BARSLAST(九转>0)),DOTLINE,COLOR99FF66;
五转:=BARSLASTCOUNT(C<REF(C,5))>=7;
关键支撑:REF(L,BARSLAST(九转>0)),DOTLINE,COLOR00FFFF;
DRAWTEXT(ISLASTBAR,关键支撑,'关键支撑'),COLORFF8000;
九转1:=BARSLASTCOUNT(C>REF(C,4))>=9;
压力:REF(H,BARSLAST(九转1>0)),DOTLINE,COLORFF0080;
DRAWICON((CROSS(C,VAR11) AND CROSS(C,关键支撑)) OR (L<VAR11 AND C>VAR11 AND L<关键支撑 AND C>关键支撑),L,38);
DRAWTEXT((CROSS(C,VAR11) AND CROSS(C,关键支撑)) OR (L<VAR11 AND C>VAR11 AND L<关键支撑 AND C>关键支撑),L,'←底部博弈'),COLORLIRED;
副图1
A1:=((MA(C,60)-L)/MA(C,20)),COLOR00FFFF;
B1:=((MA(C,60)-L)/MA(C,60)),COLOR00FF00;
C1:=((MA(C,30)-L)/MA(C,30)),COLORFF00FF;
主力:(A1+B1+C1)/3,COLOR0000FF;
散户:-1*(A1+B1+C1)/3,COLOR00FF00;
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
MA54:=MA(CLOSE,54);
MA60:=MA(CLOSE,60);
MA120:=MA(CLOSE,120);
热度:1/((MA5+MA10+MA20+MA30+MA60+MA120)/6/C)/10,COLORWHITE,DOTLINE;
BBT:热度-主力,NODRAW;
BBT1:=BBT-REF(BBT,1)>0;
BBT2:=BBT-REF(BBT,1)<0;
STICKLINE(BBT1*BBT,热度,主力,0,0),COLORFF00FF;
STICKLINE(BBT2*BBT,热度,主力,0,0),COLORFF8000;
DRAWICON(BBT<=0.02,主力,11);
{STICKLINE(REF(BBT<=0.02,1) AND BBT>0.02,散户*2,热度*2,0.5,0),COLOR8000FF;};
副图2选股一体
A1:=((MA(C,60)-L)/MA(C,20)),COLOR00FFFF;
B1:=((MA(C,60)-L)/MA(C,60)),COLOR00FF00;
C1:=((MA(C,30)-L)/MA(C,30)),COLORFF00FF;
主力:=(A1+B1+C1)/3,COLOR0000FF;
散户:=-1*(A1+B1+C1)/3,COLOR00FF00;
TJ1:=CROSS(散户,主力);
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
MA54:=MA(CLOSE,54);
MA60:=MA(CLOSE,60);
MA120:=MA(CLOSE,120);
热度:=1/((MA5+MA10+MA20+MA30+MA60+MA120)/6/C)/10,COLORWHITE,DOTLINE;
BBT:=热度-主力,NODRAW;
XS:=BBT<=0.02;
VAR2:=(2*CLOSE+HIGH+LOW)/4;
VAR4:=LLV(LOW,5);
VAR3:=HHV(HIGH,4);
VAR5:=EMA((VAR2-VAR4)/(VAR3-VAR4)*100,4);
VAR6:=EMA(0.667*REF(VAR5,1)+0.333*VAR5,2);
XG:=CROSS(VAR5,VAR6) AND VAR5<30;
XG0:=CROSS(VAR6,VAR5) AND VAR5>70;
TS:=BARSLAST(BARSLASTCOUNT(XG)=1);
A2:=REF(L,TS);
A3:=BETWEEN(TS,2,10);
TS0:=BARSLAST(BARSLASTCOUNT(XG0)=1);
A0:=REF(H,TS0);
TJ2:=REF(C,1)/A2<1 AND C/A2>1;
TJ3:=REF(C,1)/A0<1 AND C/A0>1;
VAR7:=CLOSE-REF(CLOSE,5);
VAR8:=EMA(EMA(VAR7,5),5)/EMA(EMA(ABS(VAR7),5),5);
VAR9:=EMA(EMA(VAR7,20),20)/EMA(EMA(ABS(VAR7),20),20);
VAR15:=EMA(CLOSE,2);
VAR16:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
VAR10:=(L+H+C*2)/4;
VAR11:=EMA(VAR10,14);
九转:=BARSLASTCOUNT(C<REF(C,4))>=8;
承压1:=REF(H,BARSLAST(九转>0));
五转:=BARSLASTCOUNT(C<REF(C,5))>=7;
关键支撑:=REF(L,BARSLAST(九转>0));
九转1:=BARSLASTCOUNT(C>REF(C,4))>=9;
压力:=REF(H,BARSLAST(九转1>0));
TJ4:=(CROSS(C,VAR11) AND CROSS(C,关键支撑)) OR (L<VAR11 AND C>VAR11 AND L<关键支撑 AND C>关键支撑);
选股1:=FILTERX(XS AND (TJ1+TJ2+TJ3+TJ4>0),15);
选股2:=FILTERX(REF(XS,1) AND XS=0 AND (TJ1+TJ2+TJ3+TJ4>0),10);
选股3:=FILTERX(REF(XS,2) AND REF(XS,1)=0 AND XS=0 AND (TJ1+TJ2+TJ3+TJ4>0),10);
选股4:=FILTERX(REF(XS,3) AND REF(XS,2)=0 AND REF(XS,1)=0 AND XS=0 AND (TJ1+TJ2+TJ3+TJ4>0),10);
选股5:=FILTERX(REF(XS,4) AND REF(XS,3)=0 AND REF(XS,2)=0 AND REF(XS,1)=0 AND XS=0 AND (TJ1+TJ2+TJ3+TJ4>0),10);
选股6:=FILTERX(REF(XS,5) AND REF(XS,4)=0 AND REF(XS,3)=0 AND REF(XS,2)=0 AND REF(XS,1)=0 AND XS=0 AND (TJ1+TJ2+TJ3+TJ4>0),10);
选股7:=FILTERX(REF(XS,6) AND REF(XS,5)=0 AND REF(XS,4)=0 AND REF(XS,3)=0 AND REF(XS,2)=0 AND REF(XS,1)=0 AND XS=0 AND (TJ1+TJ2+TJ3+TJ4>0),10);
XG8:=选股1+选股2+选股3+选股4+选股5+选股6+选股7;
BARSLASTCOUNT(XG8)=1;