GW:=28;
DW:=10;
超买:34.5;
超卖:3;
Zero:0;
GW1:=HHVBARS(HIGH,GW);
DW1:=LLVBARS(LOW,DW);
V1:=LLV(LOW,DW);
V2:=HHV(HIGH,GW);
价位线:EMA((CLOSE-V1)/(V2-V1)*4,4)*10;
高位:HHV(价位线,GW1),colorgreen;
低位:LLV(价位线,DW1),colorred;
平均线:(高位-低位)/2+低位,colorcyan;
高:=MA(HHV(CLOSE,GW),1);
低:=MA(LLV(CLOSE,DW),1);
高低比:=(高-低)/低*100;
TD1:=REF(高位,3)REF(高位,1) AND REF(高位,1)<高位;
TD2:=REF(高位,2)>REF(高位,1) AND REF(高位,1)<高位;
DRAWTEXT(低位>=35 OR TD1,高位+2,'清'),colorgreen;
DRAWTEXT(TD2,高位+2,'减'),colorgreen;
CD1:=低位<=1.5 AND 低位>=REF(低位,1) AND 价位线>REF(价位线,1); //抄底;
CD2:=价位线<5 AND REF(低位,2)<=REF(低位,1) AND REF(低位,1)<=低位 AND REF(价位线,2)>REF(价位线,1) AND REF(价位线,1)<价位线;
DRAWTEXT(CD1 OR CD2,价位线+2,'_底'),coloryellow;
DRAWICON(Cd1 OR CD2,高位+2,1);
Var2q:=REF(LOW,1);
Var3q:=SMA(Abs(LOW-Var2q),3,1)/SMA(MAX(LOW-Var2q,0),3,1)*100;
Var4q:=EMA(IF(CLOSE*1.3,Var3q*10,Var3q/10),3);
Var5q:=LLV(LOW,30);
Var6q:=HHV(Var4q,30);
Var7q:=IF(MA(CLOSE,58),1,0);
Var8q:=EMA(IF(LOW<=Var5q,(Var4q+Var6q*2)/2,0),3)/618*Var7q;
//主力线:EMA( (Var4q+Var6q*2)/2,3 )/618*Var7q,colorred;
Var9q:=IF(Var8q>100,Var8q,Var8q);
STICKLINE(HIGH>=Var6q,0,Var8q,6,1),colorgreen;//测试
STICKLINE(Var9q>-120,0,IF(Var9q/2>高位,高位,Var9q/2),6,1),coloryellow;//吸筹