N:=5;
P:=2;
MID : MA(CLOSE,N),colorwhite;
UPPER: MID + P*STD(CLOSE,N),coloryellow,linethick2;
LOWER: MID - P*STD(CLOSE,N),colorFF00FF,linethick2;
MID1: MA(CLOSE,26),color006699,linethick2;
stickline(MID1>ref(MID1,1),MID1+0.02,MID1-0.02,10,0),colorred;
UPPER1: MID1 + P*STD(CLOSE,26),colorgreen;
LOWER1: MID1 - P*STD(CLOSE,26),colorblue;
高:MA(REF(HIGH,1)/REF(CLOSE,2),27)*REF(CLOSE,1),colorred ,LINETHICK1;
低:MA(REF(LOW,1)/REF(CLOSE,2),27)*REF(CLOSE,1),LINETHICK2;
预测值:MA(REF(HIGH,1)/REF(CLOSE,2),N)*REF(CLOSE,1),COLORbrown,LINETHICK1;
RSV:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;
K0:=SMA(RSV,3,1);
K:=K0;D:=SMA(K,2,1);
j1:=(3*k-2*d);
j2:=MA(j1,2);
买:=filter((count(低
卖:=filter((count(高>UPPER1,5)>=1) and (UPPER > UPPER1) and cross(UPPER1,高) or count(high>UPPER1,5)>=1 and cross("kdj.d","kdj.k") and O
drawicon(买 ,LOWER*0.98,1);
drawicon(卖,UPPER*1.02,2);
drawicon((低
or ((低
and c>1.05*ref(c,1)) and MID>ref(MID,1) ,LOWER-0.2,4);
drawicon("macd.macd"UPPER or high>UPPER ))
or cross(UPPER,(高 or 预测值)) and j1