: | : | :期货量化学习 | :期货量化 |
返回列表 发帖

[大智慧指标] [转载]分时牛熊 分时附图

[大智慧指标] [转载]分时牛熊 分时附图

公式如下:
  1. {分时牛熊}
  2. 买卖:=((sum(if(time>93000,transactvol(1,0),0),0)-sum(if(time>93000,transactvol(2,0),0),0))/(sum(if(time>93000,transactvol(1,0),0),0)+sum(if(time>93000,transactvol(2,0),0),0)));
  3. k8:=barslast(sum(if(time>93000,transactnum(1,0)-transactnum(2,0),0),0)>llv(sum(if(time>93000,transactnum(1,0)-transactnum(2,0),0),0),0))<3 and barslast(sum(if(time>93000,ORDERNUM(2,0)-ORDERNUM(1,0),0),0)>llv(sum(if(time>93000,ORDERNUM(2,0)-ORDERNUM(1,0),0),0),0))<3;
  4. k11:=barslast(sum(if(time>93000,transactnum(1,0)-transactnum(2,0),0),0)>0)<3 and barslast(sum(if(time>93000,ORDERNUM(2,0)-ORDERNUM(1,0),0),0)>0)<3;
  5. k14:=barslast(sum(if(time>93000,transactnum(1,0)-transactnum(2,0),0),0)>=hhv(sum(if(time>93000,transactnum(1,0)-transactnum(2,0),0),0),0))<3 and barslast(sum(if(time>93000,ORDERNUM(2,0)-ORDERNUM(1,0),0),0)>=hhv(sum(if(time>93000,ORDERNUM(2,0)-ORDERNUM(1,0),0),0),0))<3;
  6. k17:=high/dynainfo(4)<(1+3/100);
  7. k22:=barslast(cross(买卖,0))<3 and LAST(买卖>0)>1;
  8. k23:=barslast(cross(sum(if(time>93000,transactnum(1,0)-transactnum(2,0),0),0),sum(if(time>93000,ORDERNUM(2,0)-ORDERNUM(1,0),0),0)))<3;
  9. k25:=k17 and k22 and k23 and k14 and k8 and k11;
  10. vertline(k25,0),LINETHICK5,coloryellow;
  11. 主动率:(SUM(TRANSACTNUM(1,0),0)-SUM(TRANSACTNUM(2,0),0))/(SUM(TRANSACTNUM(1,0),0)+SUM(TRANSACTNUM(2,0),0)),LINETHICK3,coloryellow;
  12. FILLRGN(0,主动率,主动率>0,rgb(80,0,0),主动率<=0,rgb(0,55,55)),LINETHICK2,PRECIS0;
  13. VAR1:=EMA(EMA(CLOSE,13),13);
  14. 控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
  15. JJ:=DYNAINFO(11);
  16. P:=55;
  17. S:=8;
  18. M1:=3;
  19. 财:=(EMA(CLOSE,S)-EMA(CLOSE,P))*10;
  20. 神:=EMA(财,M1);
  21. BTJ11:=(C-JJ)/JJ<-0.03;
  22. BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;
  23. BTJ3:=CROSS(财,神) AND 财<-0.3;
  24. BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);
  25. 庄:= BTJ11 AND BTJ2 AND BTJ3;
  26. 有庄:FILTER(庄,55);
  27. DRAWTEXT(BTJ811,有庄,'有庄'),COLORMAGENTA,ALIGN1;
  28. A1:=DYNAINFO(23) / DYNAINFO(22);
  29. A2:=DYNAINFO(17);
  30. DRAWTEXTREL(220,520,IFS((A1 >= 1),'能量:'+NUMTOSTRN(A1,2)+' 量比: '+NUMTOSTRN(A2,2),'')),linethick7,colorRED;
  31. DRAWTEXTREL(220,520,IFS((A1 < 1),'能量:'+NUMTOSTRN(A1,2)+' 量比: '+NUMTOSTRN(A2,2),'')),linethick7,colorRED;
  32. {分时秘密}
  33. K1:=EMA(CLOSE,21)-EMA(CLOSE,453);
  34. 多:K1*10,COLORFFFFFF,PRECIS1;
  35. 空:EMA(K1*10,55),COLOR00FFFF,PRECIS1;
  36. 界:2,COLORFFFF00,PRECIS1;
  37. 轴:0,COLORFF0000,PRECIS1;
  38. K3:=CROSS(K1*10,空) AND 空>=0;
  39. K4:=K3 AND CLOSE>DYNAINFO(3);
  40. K5:=(K1*10)+5;
  41. DRAWTEXT(K4,K5,'买'),COLOR00FF00;
  42. K6:=CROSS(K1*10,2) AND CLOSE>DYNAINFO(3);
  43. DRAWTEXT(K6,4,'追'),COLOR00FFFF;
  44. K7:=EMA(CLOSE,500)-REF(EMA(CLOSE,500),1);
  45. K8:=K7/REF(EMA(CLOSE,500),1);
  46. K9:=(K7/REF(EMA(CLOSE,500),1))*100;
  47. K10:=EMA(K8*100,120)-0.0004;
  48. K11:=EMA(K8*100,200);
  49. K12:=CROSS(K10,K11) AND CLOSE>DYNAINFO(3);
  50. K13:=K12 AND K1*10>0.6;
  51. DRAWICON(K13,5,12),COLORFFFFFF;
  52. K14:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(VOL*100,BARSCOUNT(CLOSE));
  53. K15:=BETWEEN(CLOSE/K14,1.05,0.95)=0;
  54. K16:=MA(CLOSE,BARSCOUNT(CLOSE));
  55. K17:=CROSS(CLOSE/IF(K15,K16,K14),1.03);
  56. STICKLINE(K17,2,5,6,0),COLORFF00FF;
  57. K18:=((DYNAINFO(6)-LOW)+0.01)/((HIGH-LOW)+0.01);
  58. K19:=IF(HIGH<DYNAINFO(6),1,K18);
  59. K20:=IF(LOW>DYNAINFO(6),0,K19);
  60. K21:=100*(CLOSE-REF(LLV(CLOSE,120),1))/(REF(HHV(CLOSE,120),1)-REF(LLV(CLOSE,120),1));
  61. K22:=(VOL/WINNER(LOW))/REF(VOL/WINNER(LOW),3);
  62. K23:=(K20>0 OR K20=1) AND K22>=3;
  63. K24:=REF((K23 AND K21<80),1) OR REF((K23 AND K21<80),2) OR REF((K23 AND K21<80),3) OR REF((K23 AND K21<80),4);
  64. K25:=IF(FILTER(K23 AND K21<80,3),5,0);
  65. K26:=IF(FILTER(K23 AND K21<80 AND K24,3),10,0);
  66. DRAWTEXT(K25,5,'进场'),COLOR00FFFF;
  67. DRAWTEXT(K26,3,'加仓'),COLORFF0000;
  68. K27:=(SMA(MAX((CLOSE-REF(CLOSE,1)),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1));
  69. K28:=(((2*CLOSE+HIGH)+LOW)/4)-LLV(LOW,34);
  70. K29:=(K28/(HHV(HIGH,34)-LLV(LOW,34)))*100;
  71. K30:=0.667*REF(EMA(K29,6),1)+0.333*EMA(K29,6);
  72. K31:=CLOSE<(DYNAINFO(6)/REF(LLV(CLOSE,120),1));
  73. K32:=COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3;
  74. K33:=COUNT(EMA(K29,6)>EMA(K30,4),3);                    
  75. K34:=REF(LOW,1)=LLV(LOW,120);
  76. K35:=K32 AND K33 AND K34 AND CLOSE>OPEN;
  77. K36:=IF(K35,1,0) AND CROSS(K27*100,15);
  78. DRAWTEXT(K36,2,'★底'),COLORFF00FF;
  79. K37:=K1*10>=2 AND MOD(CURRENTTIME,2)=0;
  80. DRAWTEXTABS(320,-12,IFS(K37,'关 注',' ')),COLORFFFF00;
  81. K38:=K1*10>=2 AND MOD(CURRENTTIME,2)=1;
  82. DRAWTEXTABS(320,-12,IFS(K38,'关 注 买 卖 总 量',' ')),COLORFFFF00;
  83. {动态买卖,部分要L2支持}
  84. a1:=(VOL/CLOSE)/3;
  85. a2:=SUM((IF(((a1>40) AND (CLOSE>(REF(CLOSE,1)))),a1,0)),0);
  86. a3:=SUM((IF(((a1>40) AND (CLOSE<(REF(CLOSE,1)))),a1,0)),0);
  87. a4:=SUM((IF(((a1<40) AND (CLOSE>(REF(CLOSE,1)))),a1,0)),0);
  88. a5:=SUM((IF(((a1<40) AND (CLOSE<(REF(CLOSE,1)))),a1,0)),0);
  89. a6:=((a2+a3)+a4)+a5;
  90. a7:=IF((BARSTATUS=2),((100*a2)/a6),0);
  91. a8:=((IF((BARSTATUS=2),((100*a3)/a6),0)));
  92. a9:=((IF((BARSTATUS=2),((100*a4)/a6),0)));
  93. a10:=((IF((BARSTATUS=2),((100*a5)/a6),0)));
  94. 机构买盘:(a2),linethick3,ColorFF55FF;
  95. 机构卖盘:(a3),linethick3,ColorFFFF55;
  96. 散户买盘:(a4),Color5555FF;
  97. 散户卖盘:(a5),Color55FF55;
  98. DRAWTEXTREL(1003,870,'机构买盘'),linethick2,ColorRED;
  99. DRAWTEXTREL(1003,570,'机构卖盘'),linethick2,ColorGREEN;
  100. DRAWTEXTREL(1003,320,'散户买盘'),linethick2,Color5555FF;
  101. DRAWTEXTREL(1003,50,'散户卖盘'),linethick2,Color55FF55;
  102. if ((BARSTATUS=2) ) Then DRAWTEXTREL(1020,750,''+FLOOR(a7)+'%'),linethick2,ColorRED;
  103. if ((BARSTATUS=2) ) Then DRAWTEXTREL(1020,460,''+FLOOR(a8)+'%'),linethick2,ColorGREEN;
  104. if ((BARSTATUS=2) ) Then DRAWTEXTREL(1020,200,''+FLOOR(a9)+'%'),linethick2,Color5555FF;
  105. if ((BARSTATUS=2) ) Then DRAWTEXTREL(1020,-50,''+FLOOR(a10)+'%'),linethick2,Color55FF55;
  106. 机构买单数:SUM(NOTICE(15),0),linethick0,COLORRED;
  107. 机构卖单数:SUM(NOTICE(16),0),linethick0,COLORGREEN;
  108. 机构吃货数:SUM(NOTICE(17),0),linethick0,COLORRED;
  109. 机构吐货数:SUM(NOTICE(18),0),linethick0,COLORGREEN;
  110. 机构吃货量:=DYNAINFO(104);
  111. 机构吐货量:=DYNAINFO(105);
  112. 大笔买入数:=SUM(NOTICE(5),0);
  113. 大笔卖出数:=SUM(NOTICE(6),0);
  114. 大笔买入量:"DBMMY.大笔总买#tick",PRECIS0,linethick3,COLORRED;
  115. 大笔卖出量:"DBMMY.大笔总卖#tick",PRECIS0,linethick3,COLORyellow;
  116. 最大值:=400/(max(机构吃货量,机构吐货量));
  117. AA:=600-(机构吃货量*最大值);
  118. drawrectrel(200,AA,350,610,rgb(200,0,0)),color000000,layer5;
  119. BB:=600-(机构吐货量*最大值);
  120. DRAWRECTREL(350,BB,500,610,RGB(0,200,0)),COLOR000000,LAYER5;
  121. DRAWTEXTREL(280,640,'机构吃货量:'),colorred;
  122. DRAWTEXTREL(280,800,'机构吐货量:'),Color00FF00;
  123. DRAWTEXTREL(420,640,NUMTOSTRN(机构吃货量,2)),colorred;
  124. DRAWTEXTREL(420,800,NUMTOSTRN(机构吐货量,2)),COLOR00FF00;
  125. DRAWTEXTREL(550,640,'大笔买入数:'),color8800ff;
  126. DRAWTEXTREL(550,800,'大笔卖出数:'),Coloryellow;
  127. DRAWTEXTREL(690,640,NUMTOSTRN(大笔买入数,1)),color8800FF;
  128. DRAWTEXTREL(690,800,NUMTOSTRN(大笔卖出数,1)),COLORyellow;
复制代码



微信截图_20181010113425.png

论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
 
期货论坛 - 版权/免责声明   1.本站发布源码(包括函数、指标、策略等)均属开放源码,用意在于让使用者学习程序化语法撰写,使用者可以任意修改语法內容并调整参数。仅限用于个人学习使用,请勿转载、滥用,严禁私自连接实盘账户交易
  2.本站发布资讯(包括文章、视频、历史记录、教材、评论、资讯、交易方案等)均系转载自网络主流媒体,内容仅为作者当日个人观点,本网转载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。本网不对该类信息或数据做任何保证。不对您构成任何投资建议,不能依靠信息而取代自身独立判断,不对因使用本篇文章所诉信息或观点等导致的损失承担任何责任。
  3.本站发布资源(包括书籍、杂志、文档、软件等)均从互联网搜索而来,仅供个人免费交流学习,不可用作商业用途,本站不对显示的内容承担任何责任。请在下载后24小时内删除。如果喜欢,请购买正版,谢谢合作!
  4.龙听期货论坛原创文章属本网版权作品,转载须注明来源“龙听期货论坛”,违者本网将保留追究其相关法律责任的权力。本论坛除发布原创文章外,亦致力于优秀财经文章的交流分享,部分文章推送时若未能及时与原作者取得联系并涉及版权问题时,请及时联系删除。联系方式:http://www.qhlt.cn/thread-262-1-1.html
如何访问权限为100/255贴子:/thread-37840-1-1.html;注册后仍无法回复:/thread-23-1-1.html;微信/QQ群:/thread-262-1-1.html;网盘链接失效解决办法:/thread-93307-1-1.html

返回列表