通达信建仓加仓跟随趋势副图指标
VAR1:=(2*CLOSE+HIGH+LOW)/4;
VAR2:=EMA(EMA(EMA(VAR1,4),4),4);
量:(VAR2-REF(VAR2,1))/REF(VAR2,1)*100, COLORSTICK;
短:MA(量,3);
超短:MA(量,1);
N:=7;
MID:=MA(C,N);
VART1:=POW((C-MID),2);
VART2:=MA(VART1,N);
VART3:=SQRT(VART2);
UPPER:=MID+2*VART3;
LOWER:=MID-2*VART3;
BOLL:=REF(MID,1);
UB:=REF(UPPER,1);
LB:=REF(LOWER,1);
LOWER1:=MID-VART3;
LB1:=REF(LOWER1,1);
BB:=(C-LB1)/(UB-LB)*MID;
MA1:=MA(BB,10);
WIDTH:=(UPPER-LOWER)/MID;
MA2:=MA(WIDTH,N);
VAR52:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
神线:=SMA(VAR52,3,1),COLORWHITE;
秘线:=SMA(神线,3,1),COLORYELLOW;
神秘线:=3*神线-2*秘线,COLORMAGENTA;
VAR11:=REF(MA(C,20),10);
开:=O-VAR11;
高:=H-VAR11;
低:=L-VAR11;
收:=C-VAR11;
一板:=(O=C),NODRAW;
VARA:=100-90*(HHV(HIGH,20)-CLOSE)/(HHV(HIGH,20)-LLV(LOW,20));
VARB:=100-90*(HHV(HIGH,20)-CLOSE)/(HHV(HIGH,20)-LLV(LOW,20));
VARC:=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(VARC<=10,10,0);
趋势线:=MA(VARC,6),LINETHICK4,COLORYELLOW;
买入:=IF(VARB<趋势线,趋势线,VARB),COLORRED;
卖出:=IF(VARA>趋势线,趋势线,VARA),COLORGREEN;
卖警戒:=IF(VARC>=90 OR CROSS(100,神秘线),95,100),COLORCYAN;
反向1:=100*(HHV(HIGH,42)-CLOSE)/(HHV(HIGH,42)-LLV(LOW,42));
反向2:=100*(HHV(HIGH,27)-CLOSE)/(HHV(HIGH,27)-LLV(LOW,27));
VF1:=EMA((CLOSE-LLV(LOW,10))/(HHV(HIGH,25)-LLV(LOW,10))*4,4)/10;
MTR:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14),NODRAW;
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=SUM(IF(HD>0 AND HD>LD,HD,0),14);
DMM:=SUM(IF(LD>0 AND LD>HD,LD,0),14);
PDI:=DMP*100/MTR;
MDI:=DMM*100/MTR,NODRAW;
ADX:=MA(ABS(MDI-PDI)/(MDI+PDI)*100,6);
ADXR:=(ADX+REF(ADX,6))/2;
高位:= PDI>33 AND MDI<10 AND ADX>40 AND ADXR>45,COLORGREEN,STICK;
危险:= HHV(VF1,4)>0.38 OR VF1>0.25 AND 高, STICK,COLORCYAN;
可买:=IF(高位=1 AND HIGH-CLOSE>CLOSE-LOW AND VOL>HHV(VOL,13)*0.4 AND (CLOSE-REF(CLOSE,1))/REF(CLOSE,1)<-0.03,-0.50,0),STICK;
调整:=IF(高位=0 AND HHV(高,5)>0,-0.25,0),COLORBLUE,STICK;
可卖:=IF(危险=1 AND HIGH-CLOSE>CLOSE-LOW AND VOL>HHV(VOL,20)/2 AND CLOSE<OPEN*1.01,-1,0),STICK;
STICKLINE((危险=1 AND 卖警戒=95 AND 反向1<10 AND 反向2<>0)OR 危险=1 AND 卖警戒=95 AND 买入>98 AND 一板<>1,0,量,-1,0),COLORBLUE;
VAR4:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主买:=IF(CLOSE>OPEN,VAR4*(HIGH-LOW),IF(CLOSE<OPEN,VAR4*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLOR00E521;
主卖:=IF(CLOSE>OPEN,VAR4*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,VAR4*(HIGH-LOW),VOL/2));
净买:=(主买-主卖)/100,NODRAW;
主买力度:=VOL/(主买-主卖),NODRAW;
买卖比:主买/主卖,NODRAW;
买比:BARSLAST(CROSS(买卖比,9.9))+1,NODRAW;
EXP1:=EXPMA(C,1),COLORMAGENTA;
EXP5:=EXPMA(C,5),COLORMAGENTA;
EXP12:=EXPMA(C,12),COLORMAGENTA;
EXP49:=EXPMA(C,49),COLORYELLOW;
EXP55:=EXPMA(C,55),COLORMAGENTA;
Z:EXP1-EXP55;
VAR5:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR6:=SMA(ABS(HIGH-VAR5),13,1)/SMA(MIN(HIGH-VAR5,0),10,1);
VAR7:=EMA(VAR6,10);
VAR8:=HHV(HIGH,33);
VAR9:=EMA(IF(HIGH>=VAR8,VAR7,0),3)/4;
拉高:IF((VAR9/6)<REF((VAR9/6),1),(VAR9/6),0),COLORLIMAGENTA,STICK,LINETHICK2;
资金流出:IF((VAR9/3)>REF((VAR9/3),1),(VAR9/3),0),COLORGREEN,STICK,LINETHICK2;
止盈:IF(CROSS(卖警戒,买入)OR (拉高<0 AND 主买力度<1 AND 主买力度<REF(主买力度,1))AND 短>REF(短,1),量-0.1,DRAWNULL),COLORGREEN,CROSSDOT,LINETHICK4;
建仓:CROSS(超短,短)AND 超短>短 AND 神秘线>秘线 AND BB>MA1,NODRAW;
DRAWICON(建仓,超短,1);
加仓:CROSS(超短,0) AND 神秘线>秘线 AND BB>MA1,NODRAW;
DRAWICON(加仓,超短,23);
STICKLINE(买比=1,超短,Z,1,0),COLORYELLOW;