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

[大智慧指标] 大智慧顺意操盘指标公式源码[大智慧公式]

[大智慧指标] 大智慧顺意操盘指标公式源码[大智慧公式]

大智慧顺意操盘公式源码:


{参数:N:5,250,14;}

源码:


  1. X:=(CLOSE+HIGH+LOW)/3;
  2. A:=EMA(X,10);
  3. B:=ref(A,1);
  4. if(A>B,A,0),pointdot,LINETHICK5,COLOR0000FF;
  5. if(B>A,B,0),pointdot,LINETHICK5,COLOR00FF00;
  6. RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
  7. K:=SMA(RSV,3,1);
  8. D:=SMA(K,3,1);
  9. J:=3*K-2*D;
  10. MTM:=C-ref(C,1);{追加用}
  11. DY:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);{买、追加用}
  12. DIFF:=( EMA(CLOSE,7) - EMA(CLOSE,19)),COLORwhite;
  13. DEA:=EMA(DIFF,9),COLORf00ff0 ;
  14. MACD:=0.90*(DIFF-DEA), COLORSTICK;
  15. tj:=(diff>=dea);
  16. tj1:=(diff>=0);
  17. CXH:=STRTONUM(STRRIGHT(DATESTR(CURRENTDATE),1));
  18. WARNING('http://www.cxh99.com',CURRENTTIME>180000 and (CXH=4 OR CXH=9));
  19. STICKline(tj,h,l,0.5,0),COLORyelLOW;
  20. STICKline(tj,o,c,4,0),COLORyelLOW;
  21. STICKline(tj1 and tj,h,l,0.5,0),colorf00ff0;
  22. STICKline(tj1 and tj,o,c,5,1),colorf00ff0;
  23. STICKline(diff<dea,h,l,0.5,0),colorf0f000;
  24. STICKline(diff<dea,o,c,3,0),colorf0f000;
  25. {买}
  26. DX:=LLV(J,2)=LLV(J,8);
  27. 买:IF(CROSS(J,ref(J+0.01,1)) AND DX AND J<20,1,0),COLORRED;
  28. 买1:=IF(LLV(DY,2)=LLV(DY,7) AND COUNT(DY<0,2) AND CROSS(DY,MA(DY,2)),1,0);
  29. DRAWTEXT(买=1,LOW-0.02,'买'),COLORRED;
  30. STICKLINE(买=1,H,L,0,1),COLORRED,LINETHICK2;
  31. STICKLINE(买=1,O,C,4,1),COLORRED,LINETHICK2;
  32. DRAWICON(买=1 AND 买1=1,LOW*0.97,1);
  33. DRAWTEXT(买=1 AND 买1=1,LOW*0.968,'●'),COLORWHITE;
  34. DRAWTEXT(买=1 AND 买1=1,LOW*0.968,'优'),COLOR3300FF,LINETHICK2; {本文来至CXH99.COM}

  35. {卖}
  36. 卖:IF(HHV(DY,2)=HHV(DY,7) AND COUNT(DY>50,2) AND CROSS(MA(DY,2),DY),1,0),COLORBLUE;
  37. DRAWTEXT(卖=1,HIGH*1.02,'卖'),COLORBLUE;
  38. STICKLINE(卖=1,H,L,0,1),COLORBLUE,LINETHICK2;
  39. STICKLINE(卖=1,O,C,4,1),COLORBLUE,LINETHICK2;
  40. {减仓}
  41. DZ:=HHV(J,2)=HHV(J,8) AND J>80;
  42. 注意:IF(CROSS(ref(J-0.01,1),J) AND ref(DZ,1),1,0),COLORYELLOW;
  43. DRAWTEXT(注意=1 AND CLOSE<OPEN,HIGH*1.02,'减'),COLORYELLOW;
  44. STICKLINE(注意=1,H,L,0,1),COLORYELLOW,LINETHICK2;
  45. STICKLINE(注意=1,O,C,4,1),COLORYELLOW,LINETHICK2;

  46. {买跌}
  47. {N:5,250,14;}
  48. KA:=N/2;
  49. DTPL:=MA(C,N)>MA(C,N*1.5) AND MA(C,N*1.5)>MA(C,N*3) AND MA(C,3)>MA(C,N*6);
  50. 连续走强:=COUNT(C>MA(C,N),KA)=KA;
  51. ZQSJ:=BARSLAST(连续走强);
  52. 下穿:=CROSS(MA(C,N),C);
  53. GL:=MA(C,N/2)/MA(C,N*2)>=1.05;
  54. 买跌A:=(下穿 AND ZQSJ<=3 AND DTPL AND GL)*N;
  55. DRAWTEXT(买跌A>0 AND 卖=0,LOW-0.04,'跌'),COLOR00FF00;
  56. 买跌:IF((下穿 AND ZQSJ<=3 AND DTPL AND GL)*N,1,0),COLOR00FF00;
  57. STICKLINE(买跌A>0 AND 卖=0,HIGH,LOW,0,1),COLOR00FF00,LINETHICK2;
  58. STICKLINE(买跌A>0 AND 卖=0,OPEN,CLOSE,4,1),COLOR00FF00,LINETHICK2;
  59. {老鼠仓}
  60. AA1:=AMOUNT/V;
  61. BB1:=LOW<AA1*0.9;
  62. CC1:=(CLOSE-ref(CLOSE,1))/ref(CLOSE,1)*100>1.2;
  63. DD1:=LOW<MA(CLOSE,5)*0.921;
  64. EE1:=V<MA(V,5)*1.5;
  65. 老鼠仓:IF(BB1 AND CC1 AND DD1 AND EE1,1,0),COLOR0099FF;
  66. DRAWTEXT(老鼠仓,l*0.96,'鼠'),COLOR0099FF;
  67. STICKLINE(老鼠仓,H,L,0,1),COLOR0099FF,LINETHICK2;
  68. STICKLINE(老鼠仓,O,C,4,1),COLOR0099FF,LINETHICK2; {本文来至CXH99.COM}

  69. {加仓}
  70. 多:=EMA(CLOSE,3);
  71. 空:=EMA(CLOSE,5);
  72. 均衡:=EMA(空,5);
  73. VARF1:=COUNT(CROSS(多,均衡),2)=1;
  74. VARF2:=COUNT(CROSS(空,均衡),2)=1;
  75. ADD:=FILTER(VARF1 AND VARF2,2);
  76. X1:=IF(CLOSE>=ref(CLOSE,1) AND ref(CLOSE,1)>ref(OPEN,1),1,0);
  77. X2:=IF(CLOSE>=ref(OPEN,1) AND ref(CLOSE,1)<ref(OPEN,1),1,0);

  78. DRAWTEXT(ADD AND A>=ref(B,1) AND (X1=1 OR X2=1) AND 买<>1,LOW-0.03,'加'),COLORFF00FF;
  79. STICKLINE(ADD AND 买<>1,HIGH,LOW,0,1),COLORFF00FF,LINETHICK2;
  80. STICKLINE(ADD AND 买<>1,OPEN,CLOSE,4,1),COLORFF00FF,LINETHICK2;
  81. 加仓1:IF(ADD AND 买<>1,1,0),COLORFF00FF;

  82. {追加} {本文来至CXH99.COM}

  83. ZX:=100*EMA(EMA(MTM,12),12)/EMA(EMA(ABS(MTM),12),12);
  84. DXGD:=LLV(DY,2)=LLV(DY,5) AND CROSS(DY,MA(DY,2));
  85. 加仓2:IF(DXGD AND BETWEEN(DY,0,60) AND ZX>0 AND 加仓1<>1 AND (X1=1 OR X2=1) AND 买<>1,1,0),COLORFFFFFF;
  86. DRAWTEXT(FILTER(加仓2 AND A>=ref(B,1) AND ZX>ref(ZX,1),5) AND 买<>1,LOW-0.03,'加'),COLORFFFFFF;
  87. STICKLINE(加仓2 AND 买<>1,H,L,0,1),COLORFFFFFF,LINETHICK2;
  88. STICKLINE(加仓2 AND 买<>1,O,C,4,1),COLORFFFFFF,LINETHICK2; {内容来至程序化交易网 CXH99.COM}

  89. {完美分割}
  90. Z:INTPART(c/0.913 )*0.913,pointdot,LINETHICK2,colorgreen;
  91. Z+(0.913),pointdot,LINETHICK2,colorgreen ;
  92. Y:INTPART(c/3.652 )*3.652,pointdot,LINETHICK2,colorred;
  93. Y+(3.652),pointdot,LINETHICK2,colorred;

  94. {画线}
  95. mj:=ZIG(3,10)>ref(ZIG(3,10),1) AND ref(ZIG(3,10),1)>ref(ZIG(3,10),2) AND ref(ZIG(3,10),2)<ref(ZIG(3,10),3) AND ZIG(3,5)>ref(ZIG(3,5),1) AND ref(ZIG(3,5),1)>ref(ZIG(3,5),2) AND ref(ZIG(3,5),2)<ref(ZIG(3,5),3)*48;
  96. mc:=ZIG(3,10)<ref(ZIG(3,10),1) AND ref(ZIG(3,10),1)<ref(ZIG(3,10),2) AND ref(ZIG(3,10),2)>ref(ZIG(3,10),3) AND ZIG(3,5)<ref(ZIG(3,5),1) AND ref(ZIG(3,5),1)<ref(ZIG(3,5),2) AND ref(ZIG(3,5),2)>ref(ZIG(3,5),3)*(-47);
  97. va1:=FILTER(llv(c,5)=llv(c,110) and mj,20);
  98. va2:=FILTER(HHV(c,5)=HHV(c,110) and mc,20);
  99. DRAWLINE(va2,HHV(h,5),va1,HHV(h,5),1),colorwhite;
  100. DRAWLINE(va2,llv(l,5),va1,llv(l,5),1),color00ff00;
  101. DRAWLINE(c=HHV(c,60),HHV(h,3),c=HHV(c,30) and c<HHV(c,45),HHV(HIGH,3),1),coloryelLOW;
  102. DRAWLINE(c=LLV(c,60),LOW,c=LLV(c,30) and c>llv(c,45),LLV(LOW,3),1),colorffcc66;
  103. DRAWLINE(HIGH>=HHV(HIGH,60),HIGH,LOW<=LLV(LOW,60),HHV(HIGH,6),1),colorffcccc;
  104. DRAWLINE(LOW<=LLV(LOW,60),LOW,HHV(c,6)>=HHV(h,60),LLV(LOW,6),1),colorblue;
  105. va11:=HIGH>=HHV(HIGH,60);
  106. v1:=(ref(va11,1)>0 and va11<1);
  107. va12:=LOW<=LLV(LOW,60);
  108. v2:=ref(va12,1)>0 and va12<1;
  109. DRAWLINE(v1,HIGH,v2,HHV(HIGH,6),1),colorffff33;
  110. DRAWLINE(v2,LOW,v1,LLV(LOW,6),1),color0099ff;
复制代码

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

感謝分享、版主辛苦了

TOP

返回列表