P1:=5;
P2:=4;
{快慢线}
底线:0,LINETHICK1,COLORMAGENTA;
高位:80,LINETHICK1,COLORMAGENTA;
低位:20,LINETHICK1,COLORMAGENTA;
VARR1:=LLV(LOW,P1);
VARR2:=HHV(HIGH,P1);
K: EMA((CLOSE-VARR1)/(VARR2-VARR1)*100,P2),COLORGREEN,LINETHICK1;
D: EMA(0.667*REF(K,1)+0.333*K,2),COLORRED,LINETHICK1;
{洗盘再买}
RSVV:=(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100;
VARB2:=(RSVV/2+22)*1;
量:=EMA(vol,13);
资金:=EMA(AMOUNT,13);
过滤:=((资金 /量) / 100);
提纯:=(((CLOSE -过滤) / 过滤) * 100);
黄金:=((提纯 < (0)) AND ZXNH);
准备:=IF(黄金 AND RSVV
DRAWTEXT(准备>0,13.6,'准'),COLORGREEN;
准备1:=REF(准备,1) OR REF(准备,2) OR REF(准备,3) OR 准备;
买:=crOSS(K,D) AND 准备1,COLORRED,NODRAW;
STICKLINE(买,0,10,1,0),COLORRED;
DRAWTEXT(买>0,13.6,'买'),COLORRED;
{建仓买点}
LC:=REF(CLOSE,1);
rsi5:=((SMA(MAX((CLOSE - LC),0),5,1) / SMA(Abs((CLOSE - LC)),5,1)) * 100);
TR1:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=SUM(IF(((HD > 0) AND (HD > LD)),HD,0),10);
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),10);
pdi:=((DMP * 100) / TR1);
mdi:=((DMM * 100) / TR1);
ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5);
AV:=(RSI5 + ADX);
DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5);
wr10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10)));
NEWVOL:=(RSI5 - WR10);
最佳买入:=(AV + NEWVOL);
最佳买入选股:=IF(CROSS(最佳买入,0),1,0),STICK,COLORRED;
VARM1:=SMA(最佳买入选股,3,1);
VARM2:=SMA(VARM1,3,1),COLOR0000FF;
VARM3:=SMA(VARM2,3,1),COLOR00FFFF;
共振:=IF(CROSS(VARM2,VARM3) AND (VARM2<40),5,0*10000),COLORCYAN,NODRAW;
STICKLINE(共振,20,30,2,0),COLORCYAN;