以下是通达信三个实战主力监控指标公式(无源码的请下载附件导入)
主力持仓量副图
换手:=V*100/CAPITAL;
主力:=MA(换手,4);
大户:=MA(换手,9);
中户:=MA(换手,17);
散户:=MA(换手,34);
均量:=(主力+大户+中户+散户)/4;
主力能量:(主力-均量),NODRAW;
大户能量:(大户-均量),NODRAW;
中户能量:(中户-均量),NODRAW;
散户能量:(散户-均量),NODRAW;
操盘:STICKLINE(主力能量>=0 AND 主力能量>=REF(主力能量,1),4.5,4.5+主力能量,1,1),COLORYELLOW;
减仓:STICKLINE(主力能量>=0 AND 主力能量< REF(主力能量,1),4.5,4.5+主力能量,1,1),COLORYELLOW;
反弹:STICKLINE(主力能量<0 AND 主力能量>=REF(主力能量,1),4.5,4.5+主力能量,1,1),COLORGREEN;
寻底:STICKLINE(主力能量<0 AND 主力能量< REF(主力能量,1),4.5,4.5+主力能量,1,1),COLORGREEN;
DRAWTEXT(ISLASTBAR=1,IF(主力能量>=0,4.2,4.8),'机构'),COLORWHITE;
操盘1:STICKLINE(大户能量>=0 AND 大户能量>=REF(大户能量,1),3,3+大户能量,1,1),COLORYELLOW;
减仓1:STICKLINE(大户能量>=0 AND 大户能量< REF(大户能量,1),3,3+大户能量,1,1),COLORYELLOW;
反弹1:STICKLINE(大户能量<0 AND 大户能量>=REF(大户能量,1),3,3+大户能量,1,1),COLORGREEN;
寻底1:STICKLINE(大户能量<0 AND 大户能量< REF(大户能量,1),3,3+大户能量,1,1),COLORGREEN;
DRAWTEXT(ISLASTBAR=1,IF(大户能量>=0,2.7,3.3),'大户'),COLORWHITE;
操盘2:STICKLINE(中户能量>=0 AND 中户能量>=REF(中户能量,1),1.5,1.5+中户能量,1,1),COLORYELLOW;
减仓2:STICKLINE(中户能量>=0 AND 中户能量< REF(中户能量,1),1.5,1.5+中户能量,1,1),COLORYELLOW;
反弹2:STICKLINE(中户能量<0 AND 中户能量>=REF(中户能量,1),1.5,1.5+中户能量,1,1),COLORGREEN;
寻底2:STICKLINE(中户能量<0 AND 中户能量< REF(中户能量,1),1.5,1.5+中户能量,1,1),COLORGREEN;
DRAWTEXT(ISLASTBAR=1,IF(中户能量>=0,1.2,1.8),'中户'),COLORWHITE;
操盘3:STICKLINE(散户能量>=0 AND 散户能量>=REF(散户能量,1),0,散户能量,1,1),COLORYELLOW;
减仓3:STICKLINE(散户能量>=0 AND 散户能量< REF(散户能量,1),0,散户能量,1,1),COLORYELLOW;
反弹3:STICKLINE(散户能量<0 AND 散户能量>=REF(散户能量,1),0,散户能量,1,1),COLORGREEN;
寻底3:STICKLINE(散户能量<0 AND 散户能量< REF(散户能量,1),0,散户能量,1,1),COLORGREEN;
DRAWTEXT(ISLASTBAR=1,IF(散户能量>=0,-0.3,0.3),'散户'),COLORWHITE;
主力筹码副图
ZLCM:=IF(C<0,0,EMA(WINNER(CLOSE)*70,3));
SHCM:=IF(C<0,0,EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3));
ZSHTL:=IF(C<0,0,SHCM/(ZLCM+SHCM)*100);
ZZLKP:=IF(C<0,0,ZLCM/(ZLCM+SHCM)*100);
ZCMZL:=IF(C<0,0,MA(ZLCM+SHCM,13));
ZZNTS:=IF(C<0,0,BARSLAST(ZSHTL<90 AND REF(ZSHTL,1)>90));
ZSHJJ:=IF(C<0,0,EMA(ZSHTL,89));
ZZLJJ:=IF(C<0,0,EMA(ZZLKP,89));
ZJLRQD:=IF(C<0,0,INTPART(ZZLKP-ZZLJJ));
SH8:=IF(C<0,0,EMA(ZSHTL,8));
DKB:=IF(C<0,0,IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0));
散户套牢系数:IF(C<0,0,INTPART(ZSHTL)),NODRAW,COLORFFFFFF;
主力控盘系数:IF(C<0,0,INTPART(ZZLKP)),NODRAW,COLORFFFF00;
资金流入强度:IF(C<0,0,ZJLRQD),NODRAW,COLOR0000FF;
市场筹码总量:IF(C<0,0,INTPART(ZCMZL)),NODRAW,COLORGREEN;
STICKLINE(ZSHTL,0,REF(ZSHTL,1)>90 AND ZSHTL<90,1,0),COLOR9966FF;
STICKLINE(CLOSE>0,ZSHTL,ZZLKP,2,0),COLOREEEEEE;
STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,1,0),COLORAAAAAA;
IF(ZSHTL,CLOSE>0,DRAWNULL),POINTDOT,COLORFFFFFF;
STICKLINE(CLOSE>0,ZZLKP,0,2,0),COLORFF0000;
STICKLINE(ZZLKP>75,ZZLKP,0,2,0),COLORFFFFFF;
STICKLINE(ZZLJJ>REF(ZZLJJ,1),ZZLKP,ZZLJJ,2,0),COLOR0000FF;
STICKLINE(ZSHTL>=90,ZZLKP,0,2,0),COLOR66FFCC;
IF(ZCMZL,CLOSE>0,DRAWNULL),COLORFF0000;
IF(ZCMZL,ZCMZL>REF(ZCMZL,1),DRAWNULL),COLOR6600FF;
DRAWTEXT(ZCMZL>REF(ZCMZL,1) AND SH8<REF(SH8,1) AND ISLASTBAR,ZCMZL,'←增量资金');
主力散户线副图
STICKLINE(C,90,90,0.9,0.9),COLOR883333;
STICKLINE(C,10,10,0.9,0.9),COLOR883333;
散户:= 100*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60));
RSV:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;
RSV1:=(C-MA(C,4))/MA(C,4)*100;
VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);
VAR5:=LLV(LOW,30);
VAR6:=HHV(VAR4,30);
VAR7:=IF(MA(CLOSE,58),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
VAR9:=IF(VAR8>100,100,VAR8);
K:=SMA(RSV,5,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
主力:=EMA(J,6),COLORYELLOW;
AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;
AA4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
AA5:=SMA(AA4,13,8);
走势:=CEILING(SMA(AA5,13,8)),COLORRED,LINETHICK2;
AA6:=SMA(AA3,21,8);
买观注: STICKLINE(走势-AA6<-65,0,7,15,1);
DRAWICON(FILTER(J>REF(J,1)AND 走势>=REF(走势,1)AND 走势<25 ,5),走势,1);
卖观注: STICKLINE(走势-AA6>85,98,90,15,1),COLORFFFF00;
DRAWICON(FILTER(J<REF(J,1)AND 走势<=REF(走势,1)AND J>85 ,5),J,2);
吸筹:STICKLINE(VAR9>-120,50,50+(VAR9/2),8,1),COLORRED;
CDMA:EMA(EMA(RSV1,7),7)*8,NODRAW,COLORWHITE;
STICKLINE(CDMA>=0 AND CDMA>=REF(CDMA,1),50,50+CDMA,2.5,0),COLORDD55CC;
STICKLINE(CDMA>=0 AND CDMA<=REF(CDMA,1),50,50+CDMA,2.5,1),COLORDD55CC;
STICKLINE(CDMA<=0 AND CDMA>=REF(CDMA,1),50,50+CDMA,2.5,1),COLOR00D080;
STICKLINE(CDMA<=0 AND CDMA<=REF(CDMA,1),50,50+CDMA,2.5,0),COLOR00D080;
快线:(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,LINETHICK2,COLOR333333;
散户线:散户,COLORFFFFFF,LINETHICK1;
主力线:主力,COLORYELLOW;
走势线:走势,COLORRED,LINETHICK3;
DRAWTEXT(ISLASTBAR,散户线,' ←散户线'),COLORFFFFFF;
DRAWTEXT(ISLASTBAR,主力线,' ←主力线'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,走势线,' ←走势线'),COLORRED;
关注低买:IF(90>散户 AND CROSS(90,散户) ,98,0),COLORMAGENTA,STICK,NODRAW;
{高抛低吸:IF(散户<10 AND CROSS(10,散户) ,20,0),COLORGREEN,STICK,NODRAW;}
风险:COUNT("RSI.RSI1"(6,12,24)>80,3)=3 AND CROSS("RSI.RSI2"(6,12,24),79.5),NODRAW;
观注顶:(散户<8 AND 主力>90 AND 走势>90 AND CDMA<=REF(CDMA,1)AND 散户线),COLORGREEN,NODRAW;
DRAWTEXT(观注顶,-1,'◆'),COLORGREEN;
DRAWTEXT(风险,95,'←风险'),COLOR00FFFF;
STICKLINE(关注低买,0,100,0,-1),COLORMAGENTA;
{STICKLINE(高抛低吸,0,100,0,-1),COLORGREEN;};
65622693.jpg
|