通达信 主力持仓 主力资金 机构能量 附图公式

[复制链接]
查看179 | 回复0 | 2022-7-24 08:59:22 | 显示全部楼层 |阅读模式

 

C/C++ www.zegu.cn 择股网提供 Code复制内容到剪贴板
  1. {主力持仓}N:=22;JJ:=(HIGH+LOW+CLOSE)/3;QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);   
  2. QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));   
  3. QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));   
  4. QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));   
  5. QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));   
  6. SVZL:SUM(((QJ1+QJ2)-(QJ3+QJ4))/SUM(VOL,60),0);   
  7. CZ:=SVZL-REF(SVZL,1);   
  8. STICKLINE(CZ<0,SVZL+CZ,SVZL,1,0),COLORFFFF00;   
  9. STICKLINE(CZ>0,SVZL,SVZL+CZ,1,0),COLORRED;   
  10.   
  11. {主力资金}AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));   
  12. 买量:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),LINETHICK0,COLORRED;   
  13. 卖量:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORGREEN;   
  14. 进出量:=买量+卖量,COLOR00FFFF;STICKLINE(进出量<0,0,进出量,1,0),COLORFF6600;   
  15. STICKLINE(进出量<0,0,进出量,3,0),COLORFF9900;   
  16. STICKLINE(进出量<0,0,进出量,1.5,0),COLORFFCC00;   
  17. STICKLINE(进出量<0,0,进出量,0.5,0),COLORCYAN;   
  18. STICKLINE(进出量>0,0,进出量,3,0),COLOR000099;   
  19. STICKLINE(进出量>0,0,进出量,3,0),COLOR0000CC;   
  20. STICKLINE(进出量>0,0,进出量,1.0,0),COLOR0000FF;   
  21. STICKLINE(进出量>0,0,进出量,0.5,0),COLORCC66FF;N:=1;QJ0:=(HIGH+LOW+CLOSE)/3;   
  22. QJ1:=IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE));   
  23. QJ2:=IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-QJ0);   
  24. QJ3:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW);   
  25. QJ4:=IF(HIGH=LOW,1,QJ0-MIN(CLOSE,OPEN));   
  26. QJ5:=VOL/(IF(HIGH=LOW,4,HIGH-LOW));   
  27. QJ6:="MACD.DIF">"MACD.DEA" AND "MACD.DEA"<0;   
  28. QJ7:="KDJ.K">"KDJ.D" AND "KDJ.D"<30;   
  29. QJ8:="MACD.DIF"<"MACD.DEA";   
  30. QJ9:="KDJ.K"<"KDJ.D" AND "KDJ.K">80;   
  31. 特大:QJ4*QJ5,NODRAW;大单:QJ3*QJ5,NODRAW;   
  32. 中单:QJ1*QJ5,NODRAW;小单:QJ2*QJ5,NODRAW;   
  33. W1:=SUM(大单,N)+SUM(特大,N);W2:=SUM(小单,N)+SUM(中单,N);   
  34. 量振1:=特大>大单 AND 大单>小单;   
  35. 量振2:=特大<小单 AND 大单<小单;   
  36. 标振1:=QJ6 AND QJ7;   
  37. 标振2:=QJ8 AND QJ9;   
  38. A:=W1-W2;A0:=IF(A>0,A,0);B0:=IF(A<0,A,0);   
  39. STICKLINE(A0,0,A0,1,0),COLOR000044;主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLORFF00FF;主力筹码集中度:WINNER(C)*100,COLORRED;   
  40.   
  41.   
  42.   
  43. {机构能量}做空能量线: SMA((HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100,2,1),COLORGREEN,LINETHICK3;   
  44. 做多能量线: SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,5,1)-8,COLORRED,LINETHICK3;   
  45. 20,POINTDOT,COLORF00FF0;   
  46. 50,POINTDOT,COLORGREEN;   
  47. 80,POINTDOT,COLORWHITE;   

B871235912.png

B871235912.png

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则