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

[大智慧指标] [转载]我的看盘分时主图(主图副图自己选择)

[大智慧指标] [转载]我的看盘分时主图(主图副图自己选择)

我的看盘分时主图
组合指标源码:

{时间设置}

  1. LTA:=FINANCE(7)+300000000;
  2. GB:=2*IF(FINANCE(7)<100000000000,FLOOR(ABS((FINANCE(7)/1000000000-1))),FLOOR(ABS((FINANCE(7)/1000000000-1)))/10),NODRAW ;
  3. C1:=CLOSE;
  4. V1:=TIME;
  5. A1:=COUNT(BARSCOUNT(C)=1 AND TIME<102000 ,0 );
  6. T:=IF(V1<130000,(FLOOR(V1/10000)-9.5)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000)),
  7. (FLOOR(V1/10000)-11)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000))),NODRAW;
  8. 成交额:AMOUNT,NODRAW;
  9. 大额线:=50*3+300*GB,COLOR00FFFF;
  10. VV2:=SUM(AMOUNT,T),NODRAW;
  11. 初正1:=IF(T=1 AND DYNAINFO(4)>=DYNAINFO(3),VV2,0);
  12. 初负1:=IF(T=1 AND DYNAINFO(4)<DYNAINFO(3),VV2,0);
  13. 初正2:=CONST(SUM(IF(T=1,初正1,0),T)),NODRAW;
  14. 初负2:=CONST(SUM(IF(T=1,初负1,0),T)),NODRAW;
  15. 初正:=CONST(SUM(IF(初正1>大额线 AND T=1,初正1,0),T)),NODRAW;
  16. 初负:=CONST(SUM(IF(初负1>大额线 AND T=1,初负1,0),T)),NODRAW;
  17. T00:=IF(C1>REF(C1,1),0.9,-0.9);
  18. T01:=IF(C1<REF(C1,1),-0.9,0.9);
  19. T02:=T00+T01;
  20. TT1:=BARSLAST(CROSS(T02,0));
  21. TT2:=BARSLAST(CROSS(0,T02));
  22. TT:=IF(T02=1.8,1,IF(T02=-1.8,-1,0));
  23. 正V1:=IF(TT=1 OR (TT=0 AND TT1>TT2),成交额,0);
  24. 负V1:=IF(TT=-1 OR (TT=0 AND TT1<TT2),成交额,0);
  25. 正总1:=初正1+SUM(正V1,T),NODRAW,COLOR0000FF;
  26. 负总1:=初负1+SUM(负V1,T),NODRAW,COLOR00FF00;
  27. 总:=(正总1+负总1)+初正2+初负2,NODRAW;
  28. 正V:=IF(正V1>大额线,正V1,0);
  29. 负V:=IF(负V1>大额线,负V1,0);
  30. 正总:初正+SUM(正V,T),NODRAW,COLOR0000FF;
  31. 负总:初负+SUM(负V,T),NODRAW,COLOR00FF00;
  32. 差%:(正总-负总)/总*100,COLOR00FF00,NODRAW;
  33. TTA:=INTPART(2*T/5);
  34. KP30:=T<240;
  35. KPGD:=H=HHV(H,0) AND KP30;
  36. GDSJ:=BARSLAST(KPGD);
  37. {强弱界}
  38. MMA30:=EMA(CLOSE,30);
  39. 强弱界定:=EMA(CLOSE,900);
  40. DRAWBAND(MMA30,RGB(100,0,0),强弱界定,RGB(0,255,0));
  41. DRAWICON(CROSS(MMA30,强弱界定),H,1);
  42. CC:=CLOSE,COLORWHITE,LINETHICK2;
  43. VAR7:=SMA(CC,6.18,1);
  44. VAR8:=SMA(VAR7,3.14,1);
  45. RCC:=DYNAINFO(3);
  46. S2:=SMA(C,3,1);
  47. S6:=SMA(C,5,1);
  48. DK:=4*(S2-S6);
  49. KK:=1;
  50. {暗轨}
  51. {AA1:=PLOYLINE(CLOSE<COST(50) AND T>5,COST(20));
  52. BB1:=PLOYLINE(CLOSE<COST(50) AND T>5,COST(80));
  53. DRAWBAND(BB1,RGB(50,50,50),AA1,DRAWNULL);
  54. {CYC}
  55. VAR1:=AMOUNT/VOL/100;
  56. VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
  57. VAR3:=SUM(AMOUNT,5)/VAR1/100;
  58. VAR4:=SUM(AMOUNT,13)/VAR1/100;
  59. VAR5:=SUM(AMOUNT,34)/VAR1/100;
  60. CYC5:=DMA(VAR2,VOL/VAR3);
  61. CYC13:=DMA(VAR2,VOL/VAR4);
  62. CYC34:=DMA(VAR2,VOL/VAR5);
  63. DRAWBAND(CYC5,RGB(00,50,50),CYC13,DRAWNULL);
  64. DRAWBAND(CYC13,RGB(00,150,150),CYC34,DRAWNULL);
  65. {分时MACD}
  66. 昨收:=DYNAINFO(3);
  67. HH:=DYNAINFO(5);
  68. LL:=DYNAINFO(6);
  69. FK:=MAX(HH-昨收,昨收-LL)*0.1;
  70. ZS:=昨收-FK*3.2;
  71. Q1:=昨收-FK*3.22;
  72. Q2:=昨收-2*FK*3.22;
  73. Q3:=昨收-3*FK*3.2;
  74. MA5:=MA(CLOSE,5);
  75. MA10:=MA(CLOSE,10);
  76. MA20:=MA(CLOSE,20);
  77. MA30:=MA(CLOSE,30);
  78. DIF:=(EMA(CLOSE,13) - EMA(CLOSE,24));
  79. DEA:=(EMA(DIF,6));
  80. MACD:=5*(DIF-DEA);
  81. STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLOR3333FF,LINETHICK3;
  82. STICKLINE(MACD>=0 AND MACD< REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLOR00D400,LINETHICK3;
  83. STICKLINE(MACD<0 AND MACD>=REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLOR757500,LINETHICK3;
  84. STICKLINE(MACD<0 AND MACD< REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLOR00D400,LINETHICK3;
  85. STICKLINE(DK>0,RCC*KK,RCC*KK+DK,0,1),COLOR3333FF;
  86. STICKLINE(DK<0,RCC*KK,RCC*KK+DK,0,1),COLOR51FF51;
  87. {多头MACD}
  88. DIFF:=EMA(CLOSE,240)-EMA(CLOSE,240)*100;
  89. DEAA:=EMA(DIFF,18);
  90. 多头MACD:=(-3*(DIFF-DEAA))*20,NODRAW;
  91. ZD:=HHV(多头MACD,0);
  92. ZX:=LLV(多头MACD,0);
  93. CZ:=(Q2-Q3)/6;
  94. FDM:=MAX(ABS(ZD),ABS(ZX))*1.5;
  95. RB:=(Q2+Q3)/2+2*(Q2-Q3)/3/FDM*多头MACD;
  96. STICKLINE(多头MACD>0,RB,(Q2+Q3)/2,2,1),LINETHICK1,COLOR3333FF;
  97. STICKLINE(多头MACD<0,RB,(Q2+Q3)/2,2,1),LINETHICK1,COLOR00DD00;
  98. {火焰山及底部信号}
  99. FAA:=WINNER(CLOSE+CLOSE*15/100)*100;
  100. FBB:=WINNER(CLOSE+CLOSE*0/100)*100;
  101. FCC:=FAA-FBB;
  102. FDD:=(WINNER(CLOSE-CLOSE*0.1/100)-WINNER(CLOSE-CLOSE*15/100))*100;
  103. FEE:=FCC<3 AND FDD<0.5 AND OPEN!=LOW;
  104. FA1:=DYNAINFO(6);
  105. FA2:=IF(LOW>FA1,0,IF(HIGH<FA1,1,(FA1-LOW+0.01)/(HIGH-LOW+0.01)));
  106. FA3:=VOL/WINNER(LOW);
  107. FA4:=REF(HHV(CLOSE,120),1);
  108. FA5:=REF(LLV(CLOSE,120),1);
  109. FA6:=100*(CLOSE-FA5)/(FA4-FA5);
  110. FA7:=FA2>0 OR FA2=1;
  111. FA8:=FA7 AND FA3/REF(FA3,3)>=3 AND FA6<80;
  112. FA9:=REF(FA8,1) OR REF(FA8,2) OR REF(FA8,3) OR REF(FA8,4);
  113. FA10:=FA8 AND FA9;
  114. FA11:=IF(FILTER(FA8,3),5,0);
  115. FA12:=IF(FILTER(FA10,3) OR FEE,10,0);
  116. EEEE:=(RCC-ZS)/5;
  117. FVAR1:=REF(LOW,1);
  118. FVAR2:=SMA(ABS(LOW-FVAR1),13,1)/SMA(MAX(LOW-FVAR1,0),13,1);
  119. FVAR3:=EMA(FVAR2,13);
  120. FVAR4:=LLV(LOW,34);
  121. FVAR51:=EMA(IF(LOW<=FVAR4,FVAR3,0),3);
  122. FVAR5:=IF(FVAR51>20,20,FVAR51);
  123. DRAWTEXT(FA11,(Q2+Q3)/2*1.02,'★进'),COLORFFFFFF;
  124. DRAWTEXT(FA12,(Q2+Q3)/2*1.03,',★加'),COLORFFFFFF;
  125. 主力进场:STICKLINE(FVAR5>REF(FVAR5,1),(Q2+Q3)/2,(Q2+Q3)/2+FVAR5*EEEE,10,0 ),COLORRED;
  126. 洗盘:IF(FVAR5<REF(FVAR5,1),FVAR5,0),COLORGREEN,NODRAW;
  127. STICKLINE(FVAR5<REF(FVAR5,1),(Q2+Q3)/2,(Q2+Q3)/2+FVAR5*EEEE,5,1),COLORGREEN;
  128. FVAR6:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-
  129. LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
  130. FVAR7:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV
  131. (LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
  132. FVAR8:=FVAR6<REF(FVAR7,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
  133. DRAWTEXT(FVAR8 AND COUNT(FVAR8,30)=1,(Q2+Q3)/2+3*EEEE,'★关注'),COLORFF24FF;
  134. JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
  135. 二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
  136. STICKLINE(二次金叉,(Q2+Q3)/2,(Q2+Q3)/2*1.01,4,0),COLORFF00FF;
  137. DRAWTEXT(二次金叉,(Q2+Q3)/2*1.01,'★二金'),COLORYELLOW;
  138. HHH:=MA(CLOSE,10);
  139. GGG:=MA(CLOSE,12);
  140. 上:=EMA((MA(HIGH,3) * 1.05),30);
  141. 下:=EMA((MA(LOW,3) * 0.96),30);
  142. 决战:STICKLINE((((CROSS(DIF,DEA) AND ((下 - REF(下,1)) > 0)) AND (MACD >= REF(MACD,1))) AND
  143. (DIF < 0)),(Q2+Q3)/2,(Q2+Q3)/2*1.01,1,0),COLOR0000FF;
  144. DRAWTEXT((((CROSS(DIF,DEA) AND ((下 - REF(下,1)) > 0)) AND (MACD >= REF(MACD,1))) AND (DIF
  145. <= 0)),(Q2+Q3)/2*1.01,'★金叉'),COLORFFFFFF;
  146. {两个主要买进信号}
  147. RSV:=((CLOSE-LLV(LOW,240))/(HHV(HIGH,240)-LLV(LOW,240))*200-100);
  148. K:=SMA(SMA(RSV,18,1),3,1);
  149. D:=MA(EMA(K,18),3);
  150. 短买:=CROSS(K,D) AND K>0 AND  CLOSE<DYNAINFO(3)*1.07;
  151. DRAWTEXT(短买,(Q2+Q3)/2+(Q2-Q3)/1,'★短买'),COLORFFFFFF;
  152. YY:=SMA(VOL,30,1);
  153. 量1:=(YY-LLV(LLV(YY,1),30))/(HHV(HHV(YY,1),30)-LLV(LLV(YY,1),30));
  154. 量:=(YY-LLV(LLV(YY,1),30))/(HHV(HHV(YY,1),30)-LLV(LLV(YY,1),30))>0.92;
  155. 短横:=((HHV(CLOSE,TTA)-LLV(CLOSE,TTA))/CLOSE)<0.04;
  156. 横后上涨:=(CLOSE/DYNAINFO(3))>=1.02=0  AND 短横 AND 量  AND CROSS(C,(MA(C*V,TTA)/MA(V,TTA) + AVEDEV(C,TTA)*2));
  157. 上涨:=FILTER((CROSS(横后上涨,0)AND 量 AND T>60
  158. OR (T>60  AND CLOSE<DYNAINFO(3)*1.04  AND (量1<0.5 OR 量1=1) AND BARSLAST(CROSS(C,(MA(C*V,TTA)/MA(V,TTA) + AVEDEV(C,TTA)*2)))<3
  159. AND CROSS(C,MA(HHV(C,TTA),1)))),30);
  160. DRAWTEXT(上涨,(Q2+Q3)/2+(Q2-Q3)/1,'★涨'),COLORRED;
  161. HHHH:REF(H,GDSJ),COLORFFFFFF,POINTDOT,LINETHICK1;
  162. 过顶:IF(CROSS(C,HHHH),1,0),COLOR00FF00,POINTDOT,NODRAW;
  163. 冲高:IF(FILTER(CROSS(C,HHHH*1.01),15),1,0),COLOR00FFFF,POINTDOT,NODRAW;
  164. DRAWBAND(VAR7,RGB(255,255,0),VAR8,RGB(0,255,255));
  165. DRAWTEXT(过顶,HHHH*1.005,'↑'),COLOR00FF00;
  166. DRAWTEXT(冲高,HHHH*1.005,'☆'),COLOR00FFFF;
  167. C,LINETHICK2,COLORFFFFFF;
  168. 均价:SUM(V*C,0)/SUM(V,0),COLORFF00FF,LINETHICK3;
  169. YC:=REF(CLOSE,1);
  170. 止损价位:=(YC*1.0035*97+0.2)/99.65,COLORRED,LINETHICK0;
  171. E:=(HIGH+LOW+OPEN+2*CLOSE)/5;
  172. 明日阻力:=2*E-LOW;
  173. 明日支撑:=2*E-HIGH;
  174. 明日突破:=E+(HIGH-LOW);
  175. 明日反转:=E-(HIGH-LOW);
  176. 今日阻力:=REF(明日阻力 , 1);
  177. 今日支撑:=REF(明日支撑 , 1);
  178. DRAWTEXT_FIX(1,0.00,0,0,'今阻:'),COLORGREEN;
  179. DRAWTEXT_FIX(1,0.05,0,0,CON2STR(今日阻力,2)),COLORGREEN;
  180. DRAWTEXT_FIX(1,0.11,0,0,'今撑:'),COLORRED;
  181. DRAWTEXT_FIX(1,0.16,0,0,CON2STR(今日支撑,2)),COLORRED;
  182. DRAWTEXT_FIX(1,0.22,0,0,'明阻:'),COLORGREEN;
  183. DRAWTEXT_FIX(1,0.27,0,0,CON2STR(明日阻力,2)),COLORGREEN;
  184. DRAWTEXT_FIX(1,0.33,0,0,'明撑:'),COLORRED;
  185. DRAWTEXT_FIX(1,0.38,0,0,CON2STR(明日支撑,2)),COLORRED;
  186. DRAWTEXT_FIX(1,0.44,0,0,'明突:'),COLORYELLOW;
  187. DRAWTEXT_FIX(1,0.49,0,0,CON2STR(明日突破,2)),COLORYELLOW;
  188. DRAWTEXT_FIX(1,0.55,0,0,'明转:'),COLORFFFF00;
  189. DRAWTEXT_FIX(1,0.60,0,0,CON2STR(明日反转,2)),COLORFFFF00;
  190. DRAWTEXT_FIX(1,0.66,0,0,'止损:'),COLORWHITE;
  191. DRAWTEXT_FIX(1,0.71,0,0,CON2STR(止损价位,2)),COLORWHITE;
复制代码



微信截图_20181015162937.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

返回列表