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
STICKLINE(準備,0,10,1,0),COLORGREEN;
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
STICKLINE(共振,20,30,2,0),COLORCYAN;