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

[通达信指标/源码] [转载]通达信多指标组合分时指标

[通达信指标/源码] [转载]通达信多指标组合分时指标

日分时多指标组合版,也是庄影难逃精简版(指盘龙驸凤部分) 目的是为

更好读图

组合内容当日分肘有:标准MACD、变形KD、冲高过顶、两组近底信号、再加

〈盘龙驸凤〉更名为红绿二喜的两条指标线。

组合中原指标一搬保留原名,但分付指标中不应有叫你买卖的提示。也不用

帕有未来。分时指标只能在分析好大盘和个股的基楚上找买卖点。

  使用要点:

一, 常用指标不多说,红喜可看作大单诤量比来分析、而绿喜可以看作是内

     外盘的诤量比来分析。

二,用多日分时供你分析出启动,调整,洗盘,再启动。








公式:
  1. {双喜临门}
  2. 昨收:=DYNAINFO(3);
  3. HH:=DYNAINFO(5);
  4. LL:=DYNAINFO(6);
  5. FK:=MAX(HH-昨收,昨收-LL)*0.1;
  6. ZS:=昨收-FK*3.2;
  7. Q1:=昨收-FK*3.22;
  8. Q2:=昨收-1*FK*3.22;
  9. Q3:=昨收-5*FK*3.2;
  10. TJ:=FILTER(C,239)>0,NODRAW;
  11. TJJ:=SUM(TJ,0),NODRAW;
  12. TJA:=CONST(TJJ),NODRAW;
  13. NN:=2400;
  14. HD:=HHV(C,NN);
  15. LD:=LLV(C,NN);
  16. 最高:=CONST(HD),NODRAW;
  17. 最低:=CONST(LD),NODRAW;
  18. HLMAX:=最高;
  19. HLMIN:=最低;
  20. HLMN1:=(HLMAX+HLMIN)/2;
  21. HLMN2:=HLMAX-HLMIN;
  22. HLMN3:=(100-0)/2*1.3;
  23. HLMN4:=(100-0)/1*1.3;

  24. {时间设置}
  25. LTA:=FINANCE(7)+300000000;
  26. GB:=2*IF(FINANCE(7)<100000000000,FLOOR(ABS((FINANCE(7)/1000000000-1))),FLOOR(ABS((FINANCE(7)/1000000000-1)))/10),NODRAW ;
  27. C1:=CLOSE;
  28. V1:=TIME;
  29. A1:=COUNT(BARSCOUNT(C)=1 AND TIME<102000 ,0 );
  30. T:=IF(V1<130000,(FLOOR(V1/10000)-9.5)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000)),
  31. (FLOOR(V1/10000)-11)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000))),NODRAW;
  32. TTA:=INTPART(2*T/5);
  33. KP30:=T<240;
  34. KPGD:=H=HHV(H,0) AND KP30;
  35. GDSJ:=BARSLAST(KPGD);
  36. 成交额:=AMOUNT,NODRAW;
  37. VV2:=SUM(AMOUNT,T),NODRAW;
  38. VV3:=VV2/T;
  39. SS:=IF(CAPITAL>150000000,0.3,IF(CAPITAL>20000000,0.5,IF(CAPITAL>10000000,0.8,IF(CAPITAL<200000,5,IF(CAPITAL<1000000,3,
  40. IF(CAPITAL<5000000,1.5,1)))))),NODRAW;
  41. VV5:=(REF(VV3,T-1)/CEILING(REF(VV3,T-1)/CAPITAL *10000+0.1))*SS,NODRAW;
  42. 大额线:=IF(REF(VV3,T)=REF(VV3,T-1),VV5,REF(VV3,T)),NODRAW;
  43. 起算量:=大额线*100,COLOR00FFFF,NODRAW;
  44. 初正1:=IF(T=1 AND DYNAINFO(4)>=DYNAINFO(3),VV2,0);
  45. 初负1:=IF(T=1 AND DYNAINFO(4)<DYNAINFO(3),VV2,0);
  46. 初正:=SUM(IF(初正1>=大额线 AND T=1,初正1,0),T),NODRAW;
  47. 初负:=SUM(IF(初负1>=大额线 AND T=1,初负1,0),T),NODRAW;
  48. 初正2:=SUM(初正1,T),NODRAW;
  49. 初负2:=SUM(初负1,T),NODRAW;
  50. T00:=IF(C1>REF(C1,1),0.9,-0.9);
  51. T01:=IF(C1<REF(C1,1),-0.9,0.9);
  52. T02:=T00+T01,NODRAW;
  53. TT1:=BARSLAST(CROSS(T02,+1.5)),NODRAW;
  54. TT2:=BARSLAST(CROSS(-1.5,T02)),NODRAW;
  55. TT:=IF(T02=1.8,1,IF(T02=-1.8,-1,0));
  56. 正V1:=IF(TT=1 OR (TT=0 AND TT1<TT2),成交额,0),NODRAW;
  57. 负V1:=IF(TT=-1 OR (TT=0 AND TT1>TT2),成交额,0),NODRAW;
  58. 正负0:=IF(成交额!= 0  AND (正V1=0 AND 负V1=0),成交额,0);
  59. 正V0:=IF(正负0!= 0 AND REF(正V1,1)!= 0 ,正负0,0);
  60. 负V0:=IF(正负0!= 0 AND REF(负V1,1)!= 0 ,正负0,0);
  61. 正V11:=正V1+正V0,NODRAW;
  62. 负V11:=负V1+负V0,NODRAW;
  63. 正V:=IF(正V11>=大额线,正V11,0);
  64. 负V:=IF(负V11>=大额线,负V11,0);
  65. 正V2:=IF(正V11<大额线,正V11,0);
  66. 负V2:=IF(负V11<大额线,负V11,0);
  67. 正总:=IF(TJJ<2,初正,0)+SUM(正V,T),NODRAW,COLOR0000FF;
  68. 负总:=IF(TJJ<2,初负,0)+SUM(负V,T),NODRAW,COLOR00FF00;
  69. 正总1:=IF(TJJ<2,初正2,0)+SUM(正V11,T),NODRAW,COLOR0000FF;
  70. 负总1:=IF(TJJ<2,初负2,0)+SUM(负V11,T),NODRAW,COLOR00FF00;
  71. 红喜%:(正总-负总)/(正总+负总)*100,COLOR00FF00,NODRAW;
  72. 绿喜%:(正总1-负总1)/(正总1+负总1)*100,COLOR00FF00,NODRAW;
  73. Q4:=IF(TJA>1 AND 红喜%>=0,HLMAX,HLMIN),NODRAW;
  74. Q5:=IF(TJA>1 AND 红喜%>=0,HLMIN,HLMAX),NODRAW;
  75. DRAWBAND(Q4,RGB(100,100,100),Q5,RGB(50,50,50));
  76. STICKLINE(TJA>1 AND CROSS(红喜%,0),Q4,Q5,10,0),COLOR777777;
  77. STICKLINE(TJA>1 AND CROSS(0,红喜%),Q4,Q5,10,0),COLOR777777;

  78. DRAWBAND(IF(TJA<2,HLMAX,DRAWNULL),RGB(10,10,10),HLMIN,DRAWNULL);
  79. HHHH:=REF(H,GDSJ),COLORFFFFFF,LINETHICK1;
  80. 过顶:IF(CROSS(C,HHHH),1,0),COLOR00FF00,POINTDOT,NODRAW;
  81. 冲高:IF(FILTER(CROSS(C,HHHH*1.01),15),1,0),COLOR00FFFF,POINTDOT,NODRAW;
  82. N:=20;
  83. L1:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100-0;
  84. 龙K:IF(TJA<2,((SMA(L1,3,1)-HLMN3)*HLMN2/HLMN4+HLMN1),DRAWNULL),COLORBBFFBB;
  85. 凤D:IF(TJA<2,SMA(龙K,3,1),DRAWNULL),COLORBBFFBB;
  86. DRAWBAND(龙K,RGB(0,150,0),((50-HLMN3)*HLMN2/HLMN4+HLMN1),RGB(0,150,0));
  87. DRAWBAND(凤D,RGB(50,50,50),((50-HLMN3)*HLMN2/HLMN4+HLMN1),RGB(50,50,50));
  88. AR1:=LLV(LOW,10);
  89. AR2:=HHV(H,25);
  90. AR3:=EMA((C-AR1)/(AR2-AR1)*4,4);
  91. 红红的天:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)
  92. -2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)
  93. -LLV(LOW,27))*100,5,1),3,1),LINETHICK0;
  94. IF(TJA<2 AND CROSS(红红的天,2),((100-HLMN3)*HLMN2/HLMN4+HLMN1),((50-HLMN3)*HLMN2/HLMN4+HLMN1)),COLOR0000CC;
  95. 有心就有:IF(TJA<2 AND CROSS(红红的天,2),((100-HLMN3)*HLMN2/HLMN4+HLMN1),DRAWNULL),CROSSDOT,LINETHICK6,COLORFF77FF;
  96. 好运!:IF(TJA<2 AND CROSS(红红的天,2),((100-HLMN3)*HLMN2/HLMN4+HLMN1),DRAWNULL),POINTDOT,LINETHICK4,COLOR00CCFF;
  97. ND:=FLOOR(C/10);
  98. DIF:=IF(TJA<2,EMA(CLOSE,12)-EMA(CLOSE,26),DRAWNULL);
  99. DEA:=EMA(DIF,9);
  100. MACD:=(DIF-DEA)*2,COLORSTICK;
  101. MACD2:=((MACD*INTPART((2500/(1+ND)))+50-HLMN3)*HLMN2/HLMN4+HLMN1);
  102. STICKLINE(TJA<2 AND MACD>=0,((50-HLMN3)*HLMN2/HLMN4+HLMN1),MACD2,0,0),COLOR0000FF,LINETHICK3;
  103. STICKLINE(TJA<2 AND MACD<0,((50-HLMN3)*HLMN2/HLMN4+HLMN1),MACD2,0,0),COLORFFFF00,LINETHICK3;
  104. IF(TJA<2,((DIF*INTPART((2500/(1+ND)))+50-HLMN3)*HLMN2/HLMN4+HLMN1),DRAWNULL),COLORFFFFFF;
  105. IF(TJA<2,((DEA*INTPART((2500/(1+ND)))+50-HLMN3)*HLMN2/HLMN4+HLMN1),DRAWNULL),COLOR00FFFF;
  106. IF(TJA<2,C,DRAWNULL),COLORFF0000;
  107. IF(TJA<2,REF(H,GDSJ),DRAWNULL),COLORFFFFFF,LINETHICK1;
  108. DRAWICON(TJA<2 AND 过顶,HHHH,1);
  109. DRAWICON(TJA<2 AND 冲高,HHHH,23);
  110. {强弱界定}
  111. MMA30:=EMA(CLOSE,30)-(Q2+Q3)/2*0.001;
  112. 强弱界定:=EMA(CLOSE,900)-(Q2+Q3)/2*0.001;
  113. DRAWBAND(IF(PERIOD=0 AND TJA>1,MMA30,DRAWNULL),RGB(130,50,0),强弱界定,RGB(0,80,80));
  114. DRAWICON(PERIOD=0 AND CROSS(MMA30,强弱界定),H,1);
  115. IF(PERIOD=0 AND TJA>2,强弱界定,DRAWNULL),COLOR888800;
  116. {金龙喜舞}
  117. 日时转换:=IF(PERIOD=5,120,240);
  118. QZS:=(EMA(CLOSE,10)+EMA(CLOSE,32))/2-(Q2+Q3)/2*0.001;
  119. VAR1:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2-(Q2+Q3)/2*0.001;
  120. VAR2:=(EMA(VOL,10)+EMA(VOL,32))/2-(Q2+Q3)/2*0.001;
  121. VAR3:=(VAR1+VAR2)/2;
  122. VAR4:=EMA(VAR3,30);
  123. VAR5:=EMA(VAR3,60);
  124. VAR6:=EVERY(VAR1>REF(VAR1,1),5) AND EVERY(VAR4>REF(VAR4,1),5);
  125. DRAWBAND(IF(PERIOD=0 AND TJA>1,MMA30,DRAWNULL),RGB(80,20,20),EMA(VAR1,60),RGB(0,150,30));
  126. IF(PERIOD=0 AND TJA>2,EMA(VAR1,60),DRAWNULL),COLOR666666;
  127. IF(PERIOD=0 AND TJA>2,MMA30,DRAWNULL),COLOR666666;
  128. 牵引线:=VAR1,COLORYELLOW;
  129. 强弱线:=EMA(VAR1,日时转换),POINTDOT,COLORFF00FF;
  130. 趋势关注:=IF(CROSS(VAR1,EMA(VAR1,60)) AND VAR6,1,0),NODRAW,COLORRED;
  131. 量价关注:=IF(CROSS(VAR3,VAR5) AND VAR6,1,0),NODRAW,COLORWHITE;
  132. 冲击量:=IF(VAR3>VAR5 AND VAR6,1,0),NODRAW,COLORYELLOW;
  133. 强势区:=IF(VAR1>强弱线,1,DRAWNULL),NODRAW,COLORRED;
  134. 止损区:=IF(VAR1<强弱线,1,DRAWNULL),NODRAW,COLORGREEN;
  135. IF(PERIOD=0 AND TJA>2, EMA(VAR1,日时转换),DRAWNULL),POINTDOT,COLORFFFFFF;
  136. IF(PERIOD=0,((50-HLMN3)*HLMN2/HLMN4+HLMN1),DRAWNULL),COLOR999999,LINETHICK2;
  137. {盘龙驸凤};
  138. DDM:=((100-HLMN3)*HLMN2/HLMN4+HLMN1);
  139. DDL:=((0-HLMN3)*HLMN2/HLMN4+HLMN1);
  140. 望喜1:=IF(PERIOD=0 AND TJA>0,IF(((绿喜%+50-HLMN3)*HLMN2/HLMN4+HLMN1)>DDM,DDM,((绿喜%+50-HLMN3)*HLMN2/HLMN4+HLMN1)),DRAWNULL),COLOR00FF00,LINETHICK1;
  141. 盘龙1:=IF(PERIOD=0 AND TJA>0,IF(((红喜%+50-HLMN3)*HLMN2/HLMN4+HLMN1)>DDM,DDM,((红喜%+50-HLMN3)*HLMN2/HLMN4+HLMN1)),DRAWNULL),COLOR00FFFF,LINETHICK2;
  142. 盘龙:IF(PERIOD=0 AND TJA>0,IF(盘龙1<DDL,DDL,盘龙1),DRAWNULL),COLORFF00FF,LINETHICK2;
  143. 望喜:IF(PERIOD=0 AND TJA>0,IF(望喜1<DDL,DDL,望喜1),DRAWNULL),COLOR00FF00,LINETHICK2;
  144. STICKLINE(PERIOD=0 AND FILTER(T,239)>0,HLMAX,HLMIN,1,0),COLORWHITE;
  145. V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
  146. 趋势线:=EMA(V11,3);
  147. V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
  148. 准备现金: STICKLINE(TJA<2 AND 趋势线<=13,((0-HLMN3)*HLMN2/HLMN4+HLMN1),((10-HLMN3)*HLMN2/HLMN4+HLMN1),5,0),COLORLIGREEN;
  149. AA:=(趋势线<=13) AND FILTER((趋势线<=13),15);
  150. 买入股票: STICKLINE(TJA<2 AND 趋势线<=13 AND V12>13,((0-HLMN3)*HLMN2/HLMN4+HLMN1),((20-HLMN3)*HLMN2/HLMN4+HLMN1),5,0),COLOR0099FF;
  151. BB:= (趋势线<=13 AND V12>13) AND FILTER((趋势线<=13 AND V12>13),10) ;
  152. 见顶清仓: STICKLINE(TJA<2 AND 趋势线>=90 AND V12,((0-HLMN3)*HLMN2/HLMN4+HLMN1),((20-HLMN3)*HLMN2/HLMN4+HLMN1),5,0),COLORRED;
复制代码

论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
 
期货论坛 - 版权/免责声明   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

返回列表