BIAS1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离: MA(BIAS,3),NODRAW;
STICKLINE(乖离<-6 AND 乖离>=-12,80,60,3,0),COLOR005C00;
STICKLINE(乖离<-12 AND 乖离>=-18,80,40,3,0),COLOR0099FF;
STICKLINE(乖离<-18 AND 乖离>=-30,80,50,3,0),COLOR33CCFF;
STICKLINE(乖离<-30,4,3,3,0),COLORRED;
DRAWTEXT(乖离<-30,3, 'B'), COLORWHITE;
DRAWTEXT(乖离<-30 AND ISLASTBAR,80, '长 买'), COLORWHITE;
R1:=MA(HHV(HIGH,500),21);
R2:=MA(HHV(HIGH,250),21);
R3:=MA(HHV(HIGH,90),21);
R4:=MA(LLV(LOW,500),21);
R5:=MA(LLV(LOW,250),21);
R6:=MA(LLV(LOW,90),21);
R7:=MA((R4*0.96+R5*0.96+R6*0.96+R1*0.558+R2*0.558+R3*0.558)/6,21);
R8:=MA((R4*1.25+R5*1.23+R6*1.2+R1*0.55+R2*0.55+R3*0.65)/6,21);
R9:=MA((R4*1.3+R5*1.3+R6*1.3+R1*0.68+R2*0.68+R3*0.68)/6,21);
RA:=MA((R7*3+R8*2+R9)/6*1.738,21);
RB:=REF(LOW,1);
RC:=SMA(ABS(LOW-RB),3,1)/SMA(MAX(LOW-RB,0),3,1)*100;
RD:=MA(IF(CLOSE*1.35<=RA,RC*10,RC/10),3);
RE:=LLV(LOW,30);
RF:=HHV(RD,30);
R10:=IF(MA(CLOSE,58),1,0);
开始建仓:MA(IF(LOW<=RE,(RD+RF*2)/2,0),3)/618*R10,COLORSTICK;
STICKLINE(开始建仓,开始建仓,0,2,0),COLORRED;
VAR111:=(3)*(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1)) - (2)*(SMA(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1),3,1));
建仓:IF((VAR111<= 3),30,0),COLOR00FF00,LINETHICK2;
补仓:IF((VAR111<5),50,0),COLORFFFFFF,LINETHICK2;
SM01:=MA((2*C+H+L)/4,5);
SM02:=SM01*(200-102)/100;
SM03:=(1-7/100)*DMA(C,ABS((2*C+H+L)/4-MA(C,20))/MA(C,20));
SM04:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
SM05:=3*SMA(SM04,3,1)-2*SMA(SMA(SM04,3,1),3,1);
SM06:=((H+L+C)/3-MA((H+L+C)/3,14))/(0.015*AVEDEV((H+L+C)/3,14));
SM07:=SM02<SM03&&SM05>REF(SM05,1)&&REF(SM05,1)<REF(SM05,2)&&SM06<-100;
买点:SM07*20,COLORYELLOW,LINETHICK2; |