三合一(上下通道)
突破:=REF(EMA(C,2),1);
A1X:=(EMA(C,10)-突破)/突破*100;
多方:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL);
空方:=IF(A1X<0,REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL);
STICKLINE(A1X>=0,多方,突破,10,0),COLOR000099;
STICKLINE(A1X<0,空方,突破,10,0),COLOR00CC66;
APX:=(H+L+C)/3;
TR0:=MAX(H-L,MAX(ABS(H-REF(C,1)),ABS(L-REF(C,1))));
MF0:=C-REF(C,2);
MF1:=REF(MF0,1);
MF2:=REF(MF0,2);
DIRECT1:=BARSLAST(MF0>MF1 AND MF0>MF2);
DIRECT2:=BARSLAST(MF0
多头获利:REF(IF(DIRECT0>50,APX*2-L,DRAWNULL),1),NODRAW;
多头停损:REF(IF(DIRECT0>50,APX-TR0,DRAWNULL),1),NODRAW;
空头回补:REF(IF(DIRECT0<-50,APX*2-H,DRAWNULL),1),NODRAW;
空头停损:REF(IF(DIRECT0<-50,APX+TR0,DRAWNULL),1),NODRAW;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
通道3:(1+7/100)*DD;
通道4:(1-7/100)*DD,COLORLIRED;
BOLL:=MA(CLOSE,20);
UPPER:=BOLL+2*STD(CLOSE,20);
LOWER:=BOLL-2*STD(CLOSE,20);
EMA1:=EMA(C,77)COLORYELLOW;
EMA2:=EMA(C,99),COLORGREEN;
EMA5:EMA(C,5),COLORWHITE;
EMA21:=EMA(C,21);
EMA34:=EMA(C,34);
EMA60:=MA(C,60);
VAR20:=(2*CLOSE+HIGH+LOW)/4;
VAR30:=IF(YEAR>=2099 AND MONTH>2,0,1);
VAR40:=LLV(LOW,5); VAR50:=HHV(HIGH,4);
散户:=EMA((VAR20-VAR40)/(VAR50-VAR40)*100,4)*VAR30;
庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR30;
DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'←吸'),COLORLIRED;
DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'←抛'),COLORGREEN;