通达信公式趋势玩股主图
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1);
B1:=FILTER(A1,10);
C1:=BACKSET(B1,10+1);
HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1);
B2:=FILTER(A2,10);
C2:=BACKSET(B2,10+1);
LD:=FILTER(C2,10);
趋势:MA(CLOSE,20),LINETHICK2;
红持有数值:IF(趋势 =REF(趋势,1),趋势,DRAWNULL),COLORRED,LINETHICK2;
蓝空仓数值:IF(REF(趋势,1) 趋势,趋势,DRAWNULL),COLORCYAN,LINETHICK2;
箱线:REF(H,BARSLAST(HD)),COLORFF00FF,POINTDOT,LINETHICK3;
体线:REF(L,BARSLAST(LD)),COLORFFFFE5,POINTDOT,LINETHICK3;
均线3:=MA(CLOSE,30),LINETHICK1;
均线2:=MA(CLOSE,20),LINETHICK0;
均线6:=MA(CLOSE,60);
均线120:=MA(CLOSE,120),COLORBLUE,LINETHICK1;
均线九九归一:MA(CLOSE,81),LINETHICK0;
{买线:=MA(CLOSE,4);}
买线:=EMA(CLOSE,2);
卖线:=EMA(SLOPE(CLOSE,32)*20+CLOSE,56),LINETHICK0;
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
DRAWTEXT (BU,LOW*0.989,'买点'),COLORYELLOW,LINETHICK3;
DRAWTEXT(SEL,HIGH*1.0175,'卖点'),COLORFFFFFF,LINETHICK3;
STICKLINE(买线 =卖线,LOW,HIGH,0,0),COLORRED;
STICKLINE(买线 =卖线,CLOSE,OPEN,3,0),COLOR0000AA;
STICKLINE(买线 =卖线,CLOSE,OPEN,1,0),COLOR0000CC;
STICKLINE(买线 卖线,CLOSE,OPEN,3,0),COLORAAAA00;
STICKLINE(买线 卖线,CLOSE,OPEN,1,0),COLORBBBB00;
STICKLINE(买线 卖线,LOW,HIGH,0,0),COLORFFFF00;
STICKLINE(CROSS(买线,卖线),OPEN,CLOSE,4,0),COLORYELLOW;
STICKLINE(CROSS(卖线,买线),OPEN,CLOSE,4,0),COLORMAGENTA;