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

发顶低集结号(公式、源码副图指标公式.副图指标公式.)[大智慧公式]

发顶低集结号(公式、源码副图指标公式.副图指标公式.)[大智慧公式]

  1. {J顶低集结}
  2. DRAWGBKlast(c>0,strip(RGB(0,0,60),RGB(0,0,0),0));
  3. 80,DOTLINE;20,DOTLINE;
  4. J9:EMA("KDJ.J"(9,3,3),5) ,COLOR0000FF,LINETHICK2;
  5. J18:EMA("KDJ.J"(18,3,3),5) ,COLOR00FFFF,DOTLINE;
  6. J27:EMA("KDJ.J"(27,3,3),5) ,COLOR00FF00,DOTLINE;
  7. J36:EMA("KDJ.J"(36,3,3),5) ,COLOR0077FF,DOTLINE;
  8. J45:EMA("KDJ.J"(45,3,3),5) ,COLOR00FFCC,LINETHICK2;
  9. A级顶:=J9>80 AND J18>80 AND J27>80 AND J36>80 AND J45>80;
  10. B级顶:=(J9>80 OR J18>80) AND (J27>80 OR J36>80 OR J45>80);
  11. A级低:=J9<5 AND J18<5 AND J27<5 AND J36<5 AND J45<5;
  12. B级低:=J9<10 AND J18<20 AND (J27<10 OR J36<10 OR J45<10);
  13. IF(A级顶,90,100),COLOR0077FF,LINETHICK3,LAYER2;
  14. IF(B级顶 ,80,100),COLOR00FF00,LINETHICK2,LAYER0;
  15. IF(A级低,10,0),COLOR00FF00,LINETHICK2,LAYER0;
  16. IF(B级低,20,0),COLORFF9900,LINETHICK2,LAYER2;
  17. FILLRGN(IF(A级顶,90,100),90),ColorFF2200,LAYER5;;
  18. FILLRGN(IF(B级顶,80,100),80),ColorFF9900,LAYER6;;
  19. FILLRGN(100,80),Color000000,LAYER7;;
  20. FILLRGN(10,20,10<20,RGB(0,40,60)),LAYER7;
  21. FILLRGN(0,10,0<10,RGB(0,60,0)),LAYER7;
  22. 选股A:A级低,LINETHICK0;
  23. {低部}
  24. DIBU:= "KDJ.K"(9,3,3)<15 AND "KDJ.D"(9,3,3)<15 AND "KDJ.K"(18,3,3)<15 AND "KDJ.D"(18,3,3)<15
  25. AND "KDJ.K"(27,3,3)<20 AND "KDJ.D"(27,3,3)<20 AND "KDJ.D"(36,3,3)<20 AND "KDJ.D"(54,3,3)<20;
  26. STICKLINE(DIBU=1,30,20,1,0),COLORff00ff,LAYER5;
  27. STICKLINE(DIBU=1,20,10,2,0),COLORYELLOW,LAYER5;
  28. STICKLINE(DIBU=1,10,0,8,0),COLORff8000,LINETHICK2,LAYER5;
  29. 选股B:DIBU,LINETHICK0;

  30. {大盘KDJ}
  31. DRSV:=(INDEXC-LLV(INDEXL,27))/(HHV(INDEXH,27)-LLV(INDEXL,27))*100;
  32. DK:=SMA(DRSV,3,1);
  33. DD:=SMA(DK,3,1);
  34. DJ:EMA((3*DK-2*DD),5),COLOR00FFFF;
  35. PARTLINE(DJ,(DJ>REF(DJ,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),POINTDOT,LINETHICK6,LAYER1;
  36. {MACD}
  37. DIF:EMA(CLOSE,12)-EMA(CLOSE,26),LINETHICK0;
  38. DEA:=EMA(DIF,9);
  39. VAR1:=HHV(DEA,53);
  40. VAR2:=LLV(DEA,55);
  41. VAR3:=DEA-(DIF-DEA);
  42. UP:=IF(DIF>VAR1 AND DEA=VAR1,MAX(LLV(VAR1,10),VAR3),VAR1);
  43. DN:=IF(DIF<VAR2 AND DEA=VAR2,MIN(HHV(VAR2,10),VAR3),VAR2);
  44. PARTLINE(105,DIF>UP,RGB(255,0,0)),LINETHICK5,LAYER4;
  45. PARTLINE(104,DIF>UP,RGB(255,120,0)),LINETHICK5,LAYER5;
  46. PARTLINE(103,DIF>UP,RGB(255,200,0)),LINETHICK5,LAYER6;
  47. PARTLINE(-3,DIF<DN,RGB(0,130,100)),LINETHICK5,LAYER4;
  48. PARTLINE(-4,DIF<DN,RGB(0,220,0)),LINETHICK6,LAYER5;
  49. {KDJ周金叉死叉}
  50. 周K:"KDJ.K#WEEK"(9,2,5),COLOR0000FF,LINETHICK0,LAYER3;
  51. 周D:"KDJ.D#WEEK"(9,2,5),COLOR00FF00,LINETHICK0;
  52. DRAWTEXT(CROSS(周K,周D),30,'J周金叉'),ALIGN1,color00FFFF,LINETHICK1;
  53. DRAWTEXT(CROSS(周D,周K),70,'J周死叉'),ALIGN1,COLOR0077FF,LINETHICK1;
  54. KDB:=BARSLAST(REF(CROSS(周K,周D),1));
  55. KDDB:=REF(WMA(C,5),KDB+1)>WMA(C,5) AND REF(周K,KDB+1)<周K AND CROSS(周K,周D);
  56. K底背:=IF(FILTER(KDDB>0,5),1,0);
  57. DRAWTEXT(K底背=1,15,'J周底背'),COLOR00FFFF,LINETHICK1;
  58. KDD:=BARSLAST(REF(CROSS(周D,周K),1));
  59. K顶背:=REF(WMA(C,5),KDD+1)<WMA(C,5) AND REF(周K,KDD+1)>周K AND CROSS(周D,周K);
  60. DRAWTEXT(FILTER(K顶背>0,5),80,'J周顶背'),COLOR0077FF,LINETHICK1;
  61. {顶底背离}
  62. {1.MACD}
  63. A1:=BARSLAST(REF(CROSS("MACD.DIFF","MACD.DEA"),1));
  64. B1:=REF(C,A1+1)>C AND REF("MACD.DIFF",A1+1)<"MACD.DIFF" AND CROSS("MACD.DIFF","MACD.DEA");
  65. DRAWTEXT(B1>0,-2,'M底背'),COLOR00FFFF,LINETHICK1;{MACD底背离};
  66. C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIFf"),1));
  67. D1:=REF(C,C1+1)<C AND REF("MACD.DIFf",C1+1)>"MACD.DIFf" AND CROSS("MACD.DEA","MACD.DIFf");
  68. DRAWTEXT(D1>0,105,'M顶背'),COLOR00FF00,LINETHICK1;{MACD顶背离};
  69. {2.KDJ}
  70. A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));
  71. B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
  72. DRAWTEXT(B2,5,'J9底背'),COLOR00FFFF,LINETHICK1;{KDJ底背离};
  73. C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
  74. D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
  75. DRAWTEXT(D2>0,80,'J9顶背'),COLOR0077FF,LINETHICK1;{KDJ顶背离};
  76. {3.RSI}
  77. A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));
  78. B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
  79. DRAWTEXT(B3>0,24,'R底背'),COLOR00FFFF,LINETHICK1;{RSI底背离}
  80. C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
  81. D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
  82. DRAWTEXT(D3>0,95,'R顶背'),COLOR0077FF,LINETHICK1;{RSI顶背离};
复制代码

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

返回列表