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

大智慧超牛全屏指标公式源码(明日阻力支撑位)[大智慧公式]

大智慧超牛全屏指标公式源码(明日阻力支撑位)[大智慧公式]

  1. 大智慧超牛全屏指标公式源码

  2. {K线+KDJ主图}
  3. gj:=if(c=INDEXC,(INDEXC+INDEXh+INDEXl+INDEXO)/4,AMOUNT/(v+0.01)/100);
  4. 明日阻力:=l+(gj-l)+(c-l);
  5. 明日支撑:=l+(c-gj);
  6. 明日阻力:=l+(gj-l)+(c-l);
  7. 明日支撑:=l+(c-gj);
  8. 今日阻力:=ref(明日阻力 , 1);
  9. 今日支撑:=ref(明日支撑 , 1);
  10. STICKLINE(DISPSTATUS=2and c>=今日阻力,今日阻力,今日阻力,30,0),Color00FF00;
  11. STICKLINE(DISPSTATUS=2and c<今日阻力,今日阻力,今日阻力,30,0),Color00FF00;
  12. STICKLINE(DISPSTATUS=2and c>=今日支撑,今日支撑,今日支撑,30,0),Color00FF00;
  13. STICKLINE(DISPSTATUS=2and c<今日支撑,今日支撑,今日支撑,30,0),Color00FF00;
  14. DRAWTEXTREL(600,10,'------------------------------------'),ColorFFFFFF;
  15. IF BARSTATUS=2 and c>=今日支撑 THEN
  16. DRAWTEXTREL(600,40,'今日支撑=:'+NUMTOSTRN(今日支撑 ,2 )),Color00FF00;
  17. IF BARSTATUS=2 and c<今日支撑 THEN
  18. DRAWTEXTREL(600,40,'今日支撑=:'+NUMTOSTRN(今日支撑 ,2 )),ColorFF0000;
  19. IF BARSTATUS=2 and c>=今日阻力 THEN
  20. DRAWTEXTREL(600,80,'今日阻力=:'+NUMTOSTRN(今日阻力 ,2 )),Color00FF00;
  21. IF BARSTATUS=2 and c<今日阻力 THEN
  22. DRAWTEXTREL(600,80,'今日阻力=:'+NUMTOSTRN(今日阻力 ,2 )),Color00FF00;
  23. IF BARSTATUS=2 and c>=明日支撑 THEN
  24. DRAWTEXTREL(750,40,'明日支撑=:'+NUMTOSTRN(明日支撑 ,2 )),Color00FF00;
  25. IF BARSTATUS=2 and c<明日阻力 THEN
  26. DRAWTEXTREL(750,80,'明日阻力=:'+NUMTOSTRN(明日阻力 ,2 )),Color00FF00;
  27. DRAWTEXTREL(600,110,'------------------------------------'),ColorFFFFFF;
  28. IF BARSTATUS=2 and v>ref(v,1) and MA(v,5)>ref(MA(v,5),1) THEN
  29. DRAWTEXTREL(600,150,'今日成交量大于昨日,且有继续增大趋势'),Color8285FF;
  30. IF BARSTATUS=2 and v<ref(v,1) and MA(v,5)>ref(MA(v,5),1) THEN
  31. DRAWTEXTREL(600,150,'今日成交量小于昨日,但有放大迹象'),Color8285FF;
  32. IF BARSTATUS=2 and v>ref(v,1)and MA(v,5)<ref(MA(v,5),1) THEN
  33. DRAWTEXTREL(600,150,'今日成交量大于昨日, 但有缩小迹象'),Color8285FF;
  34. IF BARSTATUS=2 and v<ref(v,1)and MA(v,5)<ref(MA(v,5),1) THEN
  35. DRAWTEXTREL(600,150,'今日成交量小于昨日,且有缩小迹象'),Color8285FF;

  36. DRAWGBK(c>=0),Color2B5516;平衡:EMA(C,20),CIRCLEDOT,COLORwhite;
  37. STICKLINE((CLOSE >平衡),平衡,平衡,1,0),LINETHICK6,color0000ff;
  38. STICKLINE((平衡 > CLOSE),平衡,平衡,1,0),LINETHICK6,colorff6600;

  39. DRAWGBKLAST(v>1,STRIP(RGB(0,0,205),RGB(60,179,113),0));
  40. DRAWTEXTREL(350,35,''+STKLABEL+' '+STKNAME),LINETHICK4,COLORyelLOW;
  41. DRAWTEXTABS(2,10,'现价:'+CLOSE),LINETHICK3,COLOR0000ff;
  42. DRAWTEXTABS(95,10,'涨幅:'+NUMTOSTRN(DYNAINFO(14)*100,2){(c-ref(c,1))/ref(c,1)*100}+'%'),LINETHICK3,COLOR0000ff;

  43. DRAWTEXTABS(2,40,IFS(DYNAINFO(51)>DYNAINFO(3),'卖五:'+NUMTOSTRN(DYNAINFO(51),2),'')),LINETHICK3,COLOR0000FF;
  44. DRAWTEXTABS(2,40,IFS(DYNAINFO(51)=DYNAINFO(3),'卖五:'+NUMTOSTRN(DYNAINFO(51),2),'')),LINETHICK3,COLORFFFFFF;
  45. DRAWTEXTABS(2,40,IFS(DYNAINFO(51)<DYNAINFO(3),'卖五:'+NUMTOSTRN(DYNAINFO(51),2),'')),LINETHICK3,COLOR00FF00;
  46. DRAWTEXTABS(95,45,''+DYNAINFO(50)),COLORffffff;
  47. DRAWTEXTABS(2,60,IFS(DYNAINFO(44)>DYNAINFO(3),'卖四:'+NUMTOSTRN(DYNAINFO(44),2),'')),LINETHICK3,COLOR0000FF;
  48. DRAWTEXTABS(2,60,IFS(DYNAINFO(44)=DYNAINFO(3),'卖四:'+NUMTOSTRN(DYNAINFO(44),2),'')),LINETHICK3,COLORFFFFFF;
  49. DRAWTEXTABS(2,60,IFS(DYNAINFO(44)<DYNAINFO(3),'卖四:'+NUMTOSTRN(DYNAINFO(44),2),'')),LINETHICK3,COLOR00FF00;
  50. DRAWTEXTABS(95,65,''+DYNAINFO(43)),COLORffffff;
  51. DRAWTEXTABS(2,80,IFS(DYNAINFO(36)>DYNAINFO(3),'卖三:'+NUMTOSTRN(DYNAINFO(36),2),'')),LINETHICK3,COLOR0000FF;
  52. DRAWTEXTABS(2,80,IFS(DYNAINFO(36)=DYNAINFO(3),'卖三:'+NUMTOSTRN(DYNAINFO(36),2),'')),LINETHICK3,COLORFFFFFF;
  53. DRAWTEXTABS(2,80,IFS(DYNAINFO(36)<DYNAINFO(3),'卖三:'+NUMTOSTRN(DYNAINFO(36),2),'')),LINETHICK3,COLOR00FF00;
  54. DRAWTEXTABS(95,85,''+DYNAINFO(33)),COLORffffff;
  55. DRAWTEXTABS(2,100,IFS(DYNAINFO(35)>DYNAINFO(3),'卖二:'+NUMTOSTRN(DYNAINFO(35),2),'')),LINETHICK3,COLOR0000FF;
  56. DRAWTEXTABS(2,100,IFS(DYNAINFO(35)=DYNAINFO(3),'卖二:'+NUMTOSTRN(DYNAINFO(35),2),'')),LINETHICK3,COLORFFFFFF;
  57. DRAWTEXTABS(2,100,IFS(DYNAINFO(35)<DYNAINFO(3),'卖二:'+NUMTOSTRN(DYNAINFO(35),2),'')),LINETHICK3,COLOR00FF00;
  58. DRAWTEXTABS(95,105,''+DYNAINFO(32)),COLORffffff;
  59. DRAWTEXTABS(2,120,IFS(DYNAINFO(34)>DYNAINFO(3),'卖一:'+NUMTOSTRN(DYNAINFO(34),2),'')),LINETHICK3,COLOR0000FF;
  60. DRAWTEXTABS(2,120,IFS(DYNAINFO(34)=DYNAINFO(3),'卖一:'+NUMTOSTRN(DYNAINFO(34),2),'')),LINETHICK3,COLORFFFFFF;
  61. DRAWTEXTABS(2,120,IFS(DYNAINFO(34)<DYNAINFO(3),'卖一:'+NUMTOSTRN(DYNAINFO(34),2),'')),LINETHICK3,COLOR00FF00;
  62. DRAWTEXTABS(95,125,''+DYNAINFO(31)),COLORffffff;
  63. DRAWTEXTABS(2,130,'---------------'),LINETHICK3,COLOR00ff00;
  64. DRAWTEXTABS(2,140,IFS(DYNAINFO(28)>DYNAINFO(3),'买一:'+NUMTOSTRN(DYNAINFO(28),2),'')),LINETHICK3,COLOR0000FF;
  65. DRAWTEXTABS(2,140,IFS(DYNAINFO(28)=DYNAINFO(3),'买一:'+NUMTOSTRN(DYNAINFO(28),2),'')),LINETHICK3,COLORFFFFFF;
  66. DRAWTEXTABS(2,140,IFS(DYNAINFO(28)<DYNAINFO(3),'买一:'+NUMTOSTRN(DYNAINFO(28),2),'')),LINETHICK3,COLOR00FF00;
  67. DRAWTEXTABS(95,145,''+DYNAINFO(25)),COLORffffff; {本文来至程序化交易网 cxh99.com}
  68. DRAWTEXTABS(2,160,IFS(DYNAINFO(29)>DYNAINFO(3),'买二:'+NUMTOSTRN(DYNAINFO(29),2),'')),LINETHICK3,COLOR0000FF;
  69. DRAWTEXTABS(2,160,IFS(DYNAINFO(29)=DYNAINFO(3),'买二:'+NUMTOSTRN(DYNAINFO(29),2),'')),LINETHICK3,COLORFFFFFF;
  70. DRAWTEXTABS(2,160,IFS(DYNAINFO(29)<DYNAINFO(3),'买二:'+NUMTOSTRN(DYNAINFO(29),2),'')),LINETHICK3,COLOR00FF00;
  71. DRAWTEXTABS(95,165,''+DYNAINFO(26)),COLORffffff;
  72. DRAWTEXTABS(2,180,IFS(DYNAINFO(30)>DYNAINFO(3),'买三:'+NUMTOSTRN(DYNAINFO(30),2),'')),LINETHICK3,COLOR0000FF;
  73. DRAWTEXTABS(2,180,IFS(DYNAINFO(30)=DYNAINFO(3),'买三:'+NUMTOSTRN(DYNAINFO(30),2),'')),LINETHICK3,COLORFFFFFF;
  74. DRAWTEXTABS(2,180,IFS(DYNAINFO(30)<DYNAINFO(3),'买三:'+NUMTOSTRN(DYNAINFO(30),2),'')),LINETHICK3,COLOR00FF00;
  75. DRAWTEXTABS(95,185,''+DYNAINFO(27)),COLORffffff;
  76. DRAWTEXTABS(2,200,IFS(DYNAINFO(42)>DYNAINFO(3),'买四:'+NUMTOSTRN(DYNAINFO(42),2),'')),LINETHICK3,COLOR0000FF;
  77. DRAWTEXTABS(2,200,IFS(DYNAINFO(42)=DYNAINFO(3),'买四:'+NUMTOSTRN(DYNAINFO(42),2),'')),LINETHICK3,COLORFFFFFF;
  78. DRAWTEXTABS(2,200,IFS(DYNAINFO(42)<DYNAINFO(3),'买四:'+NUMTOSTRN(DYNAINFO(42),2),'')),LINETHICK3,COLOR00FF00;
  79. DRAWTEXTABS(95,205,''+DYNAINFO(41)),COLORffffff;
  80. DRAWTEXTABS(2,220,IFS(DYNAINFO(49)>DYNAINFO(3),'买五:'+NUMTOSTRN(DYNAINFO(49),2),'')),LINETHICK3,COLOR0000FF;
  81. DRAWTEXTABS(2,220,IFS(DYNAINFO(49)=DYNAINFO(3),'买五:'+NUMTOSTRN(DYNAINFO(49),2),'')),LINETHICK3,COLORFFFFFF;
  82. DRAWTEXTABS(2,220,IFS(DYNAINFO(49)<DYNAINFO(3),'买五:'+NUMTOSTRN(DYNAINFO(49),2),'')),LINETHICK3,COLOR00FF00;
  83. DRAWTEXTABS(95,225,''+DYNAINFO(48)),COLORffffff;

  84. 上轨:(SMA(HIGH,21,2) * 1.092),POINTDOT,colorFFFFFF;
  85. 中轨道:(SMA(HIGH,21,2) * 1.017),POINTDOT,colorFFFFFF;
  86. 下轨道:(SMA(LOW,21,2) * 0.969),POINTDOT,color00FFFF;

  87. WCW:=BARSLAST(WEEKDAY>ref(WEEKDAY,1));{周}
  88. CAW:=IF(WCW>0,LLV(C,WCW),LLV(C,WEEKDAY));{周}
  89. 周涨幅:=(C/CAW-1)*100;
  90. WCM:=BARSLAST(MONTH>ref(MONTH,1));{月}
  91. CAM:=IF(WCM>0,LLV(C,WCM),LLV(C,MONTH));{月}
  92. 月涨幅:=(C/CAM-1)*100;
  93. WCY:=BARSLAST(YEAR>ref(YEAR,1));{年}
  94. CAY:=IF(WCY>0,LLV(C,WCY),LLV(C,YEAR));{年}
  95. 年涨幅:=(C/CAY-1)*100;
  96. DRAWFLAGTEXT(周涨幅,LOW*0.95,'周涨幅:'+NUMTOSTRN(周涨幅,2)+'%');
  97. DRAWFLAGTEXT(月涨幅,LOW*0.95,'月涨幅:'+NUMTOSTRN(月涨幅,2)+'%');
  98. DRAWFLAGTEXT(年涨幅,LOW*0.95,'年涨幅:'+NUMTOSTRN(年涨幅,2)+'%');

  99. JJ:=(OPEN+LOW+HIGH+CLOSE*2)/5;
  100. JJ2:=MA(JJ,2);
  101. V2:=MA(VOL,2);
  102. D:sMA((JJ*VOL+JJ2*V2)/(VOL+V2),3,1),LINETHICK2,colorMAgenta;
  103. K:6*D-5*sMA(JJ2,3,1),COLORyelLOW;
  104. J:5*K-4*D,colorgreen;
  105. 买入:=ref(J,1)<ref(D ,1) and J>=D;
  106. DRAWICON(买入,J*1,1);
  107. partline(J,J>=ref(J,1),RGB(255,0,0),J<ref(J,1),RGB(0,250,0)),LINETHICK3;

  108. a:="LTFunc5@FORLT2";{计算BS点}
  109. s1:="LTFunc5@LT_S1";{s1=0,向下; s1=1,向上}
  110. hs:="LTFunc5@LT_HS";{短线买入机会}
  111. ls:="LTFunc5@LT_LS";{短线卖出机会}
  112. p1:="LTFunc5@LT_P1";{p1=1,显示BS,p1上穿0线,B点 ; p1下穿1线,S点}
  113. upp:="LTFunc5@LT_UPP";{明日B点预测} {文章来至程序化交易网 cxh99.com}
  114. udd:="LTFunc5@LT_UDD";{明日S点预测}
  115. drawbmp(p1=1 and ref(p1,1)=0,l,'buy1.bmp'),align1,valign0;
  116. drawbmp(p1=0 and ref(p1,1)=1,h,'sell1.bmp'),align1,valign2;
  117. drawbmp(s1=1 and ref(s1,1)=0 and (p1+ref(p1,1))<>1,l,'bs.bmp'),align1,valign0;
  118. drawbmp(s1=0 and ref(s1,1)=1 and (p1+ref(p1,1))<>1,h,'ss.bmp'),align1,valign2;

  119. {K线+MACD副图}
  120. DIFF : EMA(CLOSE,12) - EMA(CLOSE,26),colorred;
  121. DEA : EMA(DIFF,9),colorgreen;
  122. MACD :4*(DIFF-DEA), COLORSTICK;
  123. D1:=EMA(C,3)-EMA(C,8);
  124. D3:=EMA(H,3)-EMA(H,8);
  125. D4:=EMA(L,3)-EMA(L,8);
  126. DRAWICON(cross(d1,diff) and diff<-0.05 ,d4,9);
  127. DRAWICON(cross(diff,d1) and diff>0.1 ,d3,10);
  128. Var1:=ref(MA(C,20),10);
  129. 开:=O-Var1;
  130. 高:=H-Var1;
  131. 低:=L-Var1;
  132. 收:=C-Var1;
  133. MID:=MA(C,20);
  134. UPPER:=MID+2*STD(C,20);
  135. LOWER:=MID-2*STD(C,20);
  136. V1:=(C-LOWER)/(UPPER-LOWER)*100;
  137. V2:=V1-EMA(V1,5);
  138. K1:=SUM(LLV(V2,4),4)/4;
  139. V3:=EMA(V2,64)*10;
  140. V4:=EMA(0.4*V2*(-1),3);
  141. V5:=-1*EMA(V2,39)*10;
  142. A:=V3>10;
  143. B:=V2>V4;
  144. D:=V5>10;
  145. E:=V3<=10 OR V2<=V4 OR V5<=10;
  146. STICKLINE(C,0,0,6,0),coloryelLOW;
  147. STICKLINE(收>=开 AND E,高,低,0,0), COLORred;
  148. STICKLINE(收>=开 AND E,收,开,8,0) ,COLORred;
  149. STICKLINE(收< 开 AND E,高,低,0,0) ,COLORgreen;
  150. STICKLINE(收< 开 AND E,收,开,8,0) ,COLORgreen;
  151. STICKLINE(开> 收 AND A,低,高,0,0),COLORYELLOW;
  152. STICKLINE(开> 收 AND A,收,开,8,0),COLORYELLOW;
  153. STICKLINE(开<=收 AND A,低,高,0,0),COLORYELLOW;
  154. STICKLINE(开<=收 AND A,收,开,8,1),COLORYELLOW;
  155. STICKLINE(开> 收 AND B,低,高,0,0),COLORRED;
  156. STICKLINE(开> 收 AND B,收,开,8,0),COLORRED;
  157. STICKLINE(开<=收 AND B,低,高,0,0),COLORRED;
  158. STICKLINE(开<=收 AND B,收,开,8,1),COLORRED;
  159. STICKLINE(开> 收 AND D,低,高,0,0),COLORGREEN;
  160. STICKLINE(开> 收 AND D,收,开,8,0),COLORGREEN;
  161. STICKLINE(开<=收 AND D,低,高,0,0),COLORGREEN;
  162. STICKLINE(开<=收 AND D,收,开,8,1),COLORGREEN;
  163. KS:=(C-SMA(C,13,1))/SMA(C,13,1)*(-100); {内容来至程序化交易网 CXH99.COM}
  164. RKS:=ref(KS,1);
  165. MLS:=RKS/KS>1.23 AND RKS>13 AND C/ref(C,1)>1.03;
  166. 超跌:STICKLINE(KS>13,高,低,0,1),colorwhite,LINETHICK2;
  167. 反弹:STICKLINE(MLS=1,高,低,0,1),colorMAgenta,LINETHICK2;
  168. STICKLINE(KS>13,开,收,8,1),colorwhite,LINETHICK2;
  169. STICKLINE(MLS=1,开,收,8,1),colorMAgenta,LINETHICK2;
  170. 开盘价:c,LINETHICK0,precis2,coloryelLOW;
  171. 最高价:h,LINETHICK0,precis2,colorred;
  172. 最低价:L,LINETHICK0,precis2,colorcyan;
  173. 即时价:c,LINETHICK0,precis2,colorgreen;
  174. DRAWTEXTABS(10,5,'所属板块:'+BKNAME),COLOR00FF00,LINETHICK1;
  175. DRAWGBK(DATE>900101,STRIP(RGB(18,160,0),RGB(25,8,0),0));

  176. {星期显示}
  177. yy1:=WEEKDAY;
  178. IF BARSTATUS=2 and (yy1=5) THEN BEGIN DRAWTEXTREL(10,950,'■星期五■'),LINETHICK2,Color191970;end;
  179. IF BARSTATUS=2 and (yy1=4) THEN BEGIN DRAWTEXTREL(10,950,'■星期四■'),LINETHICK2,ColorEEE8AA;end;
  180. IF BARSTATUS=2 and (yy1=3) THEN BEGIN DRAWTEXTREL(10,950,'■星期三■'),LINETHICK2,ColorBA55D3;end;
  181. IF BARSTATUS=2 and (yy1=2) THEN BEGIN DRAWTEXTREL(10,950,'■星期二■'),LINETHICK2,Color0000CD;end;
  182. IF BARSTATUS=2 and (yy1=1) THEN BEGIN DRAWTEXTREL(10,950,'■星期一■'),LINETHICK2,ColorADFF2F;end;
  183. IF BARSTATUS=2 and (yy1=6) THEN BEGIN DRAWTEXTREL(10,950,'■星期六■'),LINETHICK2,Color00008B;end;
  184. IF BARSTATUS=2 and (yy1=0) THEN BEGIN DRAWTEXTREL(10,950,'■星期日■'),LINETHICK2,ColorFF0000;end;
复制代码

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

微信截图_20181224144317.png
如何访问权限为100/255贴子:/thread-37840-1-1.html;注册后仍无法回复:/thread-23-1-1.html;微信/QQ群:/thread-262-1-1.html;网盘链接失效解决办法:/thread-93307-1-1.html

TOP

返回列表