n1:=14;n2:=34;n3:=55;n4:=5;
MA1:=MA(CLOSE,5);
MA2:=MA(CLOSE,10);
MA3:=MA(CLOSE,20);
MA4:=MA(CLOSE,30);
MA5:=MA(CLOSE,55);
MA8:=MA(CLOSE,125);
MA6:=MA(vol,5);
MA7:=MA(VOL,40);
Var1:=EMA(AMOUNT/VOL/100,3);
天际:=EMA(Var1,240);
水平面:= EMA(Var1,88)*0.85;
海底:=EMA(Var1,88)*0.74;
Var22:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
Var33:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;
VarF:=(HIGH+LOW+CLOSE)/3;
Var10:=(VarF-MA(VarF,14))/(0.015*AVEDEV(VarF,14));
Var11:=(CLOSE-LLV(LOW,45))/(HHV(HIGH,45)-LLV(LOW,45))*100;
Var12:=SMA(Var11,3,1);
Var13:=SMA(Var12,3,1);
Var14:=3*Var12-2*Var13;
Var15:=CLOSE< REF(CLOSE,1);
Var16:=OPEN< REF(CLOSE,1);
Var17:=(Var13< 10 AND Var33< -30 AND Var22>6 AND Var10<-107);
Q:= Var17 OR COUNT(Var17,10) AND Var15 OR COUNT(Var17,10) AND Var16;
AA:=FILTER(Q,20);
RSV:= (CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100;
FASTK:=SMA(RSV,3,1);
K:=SMA(FASTK,3,1);
D:=SMA(K,5,1);
A1:=LLV(LOW,5)=LLV(LOW,45) AND CLOSE>=OPEN*1.04;
A2:=CLOSE>(REF(HIGH,1)+REF(LOW,1))/2;
wr1:= -100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34));
WR2:= -100*(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(LOW,55));
WR3:= -100*(HHV(HIGH,89)-CLOSE)/(HHV(HIGH,89)-LLV(LOW,89));
b:=SMA((3*h+2*c+o+l)/7,10,1);
w1:=-100*(HHV(Hhv(b,1),N1)-b)/(HHV(Hhv(b,1),N1)-LLV(Llv(b,1),N1));
w2:=-100*(HHV(Hhv(b,1),N2)-b)/(HHV(Hhv(b,1),N2)-LLV(Llv(b,1),N2));
w3:=-100*(HHV(Hhv(b,1),N3)-b)/(HHV(Hhv(b,1),N3)-LLV(Llv(b,1),N3));
w4:=-100*(HHV(Hhv(b,1),N4)-b)/(HHV(Hhv(b,1),N4)-LLV(Llv(b,1),N4));
价格:=(w1+w2+w3+w4)/4;
a:=SMA(vol,10,1);
wr1:=-100*(HHV(Hhv(a,1),N1)-a)/(HHV(Hhv(a,1),N1)-LLV(Llv(a,1),N1));
wr2:=-100*(HHV(Hhv(a,1),N2)-a)/(HHV(Hhv(a,1),N2)-LLV(Llv(a,1),N2));
wr3:=-100*(HHV(Hhv(a,1),N3)-a)/(HHV(Hhv(a,1),N3)-LLV(Llv(a,1),N3));
wr4:=-100*(HHV(Hhv(a,1),N4)-a)/(HHV(Hhv(a,1),N4)-LLV(Llv(a,1),N4));
量:=(wr1+wr2+wr3+wr4)/4;
wr:=-100*(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(LOW,55));
关注买:= crOSS(WR,-45) AND CLOSE>MA5 AND MA3>REF(MA3,1) AND K>REF(K,1);
DRAWTEXT(关注买 ,LOW-LOW*0.02,'关\n注\n买'),colorred;
量价齐升:=((CROSS(量,-45)) or (CROSS(量,-50))) AND ((CROSS(WR,-45)) or (CROSS(WR,-50))) AND CROSS(CLOSE,ma4) AND CROSS(CLOSE,ma5);
DRAWTEXT(量价齐升,LOW-LOW*0.02,'量价\n齐升'),COLORyellow;
bb:=CLOSE=HIGH AND CLOSE>REF(HIGH,1) AND WR>=REF(WR,1) AND ((REF(CLOSE,1)<EMA(Var1,88)*0.74) or( CLOSE<EMA(Var1,88)*0.74)) AND k<20 ;
半仓买:=FILTER(bb,5);
DRAWTEXT(半仓买,LOW-LOW*0.01,'半\n仓'),colorred;
m:= WR1=WR2 AND WR1=WR3 ;
Var2:=VOL*CLOSE;
Var3:=EMA(Var2,11)/EMA(VOL,11);
Var4:=(EMA(CLOSE,5)-Var3)/Var3*100;
Var5:=EMA(Var4,5);
卖出:= CROSS(Var5,Var4) AND Var5>2;
{- }
DRAWTEXT(卖出,HIGH*1.01,'卖'),COLORgreen;
D1:= CROSS(Var4,Var5) AND Var5<-2 AND Var3>REF(Var3,1) AND (LOW<海底 or CLOSE<海底) AND k<20 AND k>REF(k,1) AND LOW<COST(1) AND CLOSE>(COST(1)) AND CLOSE>REF(HIGH,1);
D2:=(( CLOSE<海底)or(LOW <海底)) AND CLOSE>LOW AND k<20 AND k>REF(k,1) AND LOW<(COST(1)) AND CLOSE>(COST(1)) AND M AND CLOSE>REF(HIGH,1);
D3:= CROSS(Var4,Var5) AND Var5<-6.3 AND CLOSE>REF(HIGH,1) AND (LOW<海底 or CLOSE<海底) AND k<20 AND k>REF(k,1) AND LOW<COST(0.5) AND CLOSE>(COST(1));
D4:=AA;
全仓买:=D1 OR D2 OR D3 OR D4;
DRAWTEXT(全仓买,LOW-LOW*0.09,'全\n仓'),COLORyellow;
卖:=CLOSE>REF(CLOSE,1)AND WR/1.5<REF(WR,1);
DRAWTEXT(卖,HIGH*1.03,'绝\n顶2'),COLORgreen;
绝顶:=WR=0 and 量=0 and 价格>-10;
DRAWTEXT(绝顶,HIGH*1.03,'绝\n顶1'),COLORgreen;
Var7:=REF(CLOSE,1);
Var8:=SMA(MAX(CLOSE-Var7,0),7,1)/SMA(Abs(CLOSE-Var7),7,1)*100;
Var9:=CROSS(69,Var8);
VarA:=FILTER(Var9,4);
DRAWTEXT(VarA,HIGH*1.07,'绝\n卖'),COLORCYAN;