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

大智慧【七种K线图】放在一图上可分可合 指标 源码[大智慧公式]

大智慧【七种K线图】放在一图上可分可合 指标 源码[大智慧公式]

把我们日常需要看的七种K线图放在一图上可合可分方便得很,【0】成本波段K线图 【1】COST成本均线【2】CYC成本均线【23】普通MA均线【4】费氏MA成本均线【5】黄金分割【6】BOLL
这七种K线图是我们日常需要看的K线图,现在有了它不必东翻西找,一图在手改一下参数要合看,分开看,要对比一目了然起不方便,这才是人人需要宝贝呢,我发的图是基本【0】其它变化的就不必上图了



大智慧【七种K线图】放在一图上可合可分方便得很

  1. INPUT:N(1,0,1),P(1,0,1),P1(1,0,1),M(1,0,1),Y(1,0,1),W(1,0,1);;
  2. {K线}
  3. STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),LOW,HIGH,0.1,0),colorred;
  4. STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),OPEN,CLOSE,8,0),colorred;
  5. STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),LOW,HIGH,0.1,0),colorcyan;
  6. STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),OPEN,CLOSE,8,0),colorcyan;
  7. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLOR008800;
  8. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR00AA00;
  9. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR00BB00;
  10. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLOR00CC00;
  11. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00DD00;
  12. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00EE00;
  13. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00FF00;
  14. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;
  15. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0) ,COLOR000066;
  16. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000088;
  17. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR0000AA;
  18. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR0000BB;
  19. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR0000CC;
  20. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000DD;
  21. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000EE;
  22. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000FF;
  23. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLOR0000FF;
  24. {卖黄金,RSI=80}
  25. LC:=REF(C,1);
  26. 卖黄金:((SMA(MAX((C - LC),0),3,1) / SMA(ABS((C - LC)),3,1)) * 100),LINETHICK0;
  27. STICKLINE(CROSS(80,卖黄金) AND C<O,H,L,2,0),COLOR00ffff,LAYER0;
  28. STICKLINE(CROSS(80,卖黄金) AND C<O,C,O,9,0 ),COLOR007777,LAYER0;
  29. STICKLINE(CROSS(80,卖黄金) AND C<O,C,O,8,0 ),COLOR009999,LAYER0;
  30. STICKLINE(CROSS(80,卖黄金) AND C<O,C,O,6,0 ),COLOR00BBBB,LAYER0;
  31. STICKLINE(CROSS(80,卖黄金) AND C<O,C,O,4,0 ),COLOR00DDDD,LAYER0;
  32. STICKLINE(CROSS(80,卖黄金) AND C<O,C,O,2 ,0 ),COLOR00ffff,LAYER0;
  33. Y5:EMA(CYC(3),5),COLORFFFFFF,LINETHICK1;
  34. PARTLINE(Y5 ,(Y5>REF(Y5,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),LINETHICK2,LAYER0;
  35. IF N=1 THEN BEGIN
  36. {1.成本线A}
  37. CYC1:COST(1),COLORFF66CC;
  38. CYC5:COST(5),COLORFF00CC;
  39. CYC13:COST(13),COLOR00CCCC;
  40. CYC34:COST(34),COLOR00DEEE;
  41. CYC55:COST(55),COLOR00ACCC,LINETHICK2;
  42. CYC79:COST(79),COLORAACC22;
  43. CYC95:COST(95),COLORGREEN;
  44. END
  45. IF P=1 THEN BEGIN
  46. {2.成本线B}
  47. cyc5B:CYC(5),DOTLINE;
  48. cyc13B:cyc(13),DOTLINE;
  49. cyc34B:cyc(34),DOTLINE;
  50. cyc55B:cyc(55),DOTLINE;
  51. cyc89B:cyc(89),DOTLINE;
  52. cyc144B:cyc(144),DOTLINE;
  53. cyc0B:MAXCYC,colorff9900,DOTLINE;
  54. END
  55. {3.均线A}
  56. IF P1=1 THEN BEGIN
  57. MA5:MA(CLOSE,5),COLOR0000ff;
  58. MA10:MA(CLOSE,10),COLOR00ffff;
  59. MA20:MA(CLOSE,20),COLORff00ff;
  60. MA30:MA(CLOSE,30),COLORff99ff;
  61. MA60:MA(CLOSE,60),COLOR00ff00;
  62. MA120:MA(CLOSE,120),COLORff9900;
  63. END
  64. {4.均线B}
  65. IF M=1 THEN BEGIN
  66. MA3B:MA(CLOSE,3);
  67. MA5B:MA(CLOSE,5);
  68. MA8B:MA(CLOSE,8);
  69. MA13B:MA(CLOSE,13);
  70. MA21B:MA(CLOSE,21);
  71. MA34B:MA(CLOSE,34);
  72. MA55B:MA(CLOSE,55);
  73. MA89B:MA(CLOSE,89);
  74. MA144B:MA(CLOSE,144);

  75. END
  76. {5.黄金比}
  77. IF Y=1 THEN BEGIN
  78. X:=BARSLAST(DISPSTATUS=1)+1;
  79. ah:=hhvall(hhv(h,X));
  80. al:=llvall(llv(l,X));
  81. nnl:=DISPSTATUS=2;
  82. ahl:=ah-al;
  83. q191:=al+ahl*0.191;
  84. q382:=al+ahl*0.382;
  85. q500:=al+ahl*0.500;
  86. q618:=al+ahl*0.618;
  87. q809:=al+ahl*0.809;

  88. DRAWTEXT(nnl,ah,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),ALIGN1,COLOR0000ff;
  89. DRAWTEXT(nnl,q809,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),ALIGN1,COLORddaa00;
  90. DRAWTEXT(nnl,q618,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),ALIGN1,COLORddaa00;
  91. DRAWTEXT(nnl,q500,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),ALIGN1,COLOR00ffff;
  92. DRAWTEXT(nnl,q382,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),ALIGN1,COLORddaa00;
  93. DRAWTEXT(nnl,q191,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),ALIGN1,COLORddaa00;
  94. DRAWTEXT(nnl,al,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),ALIGN1,COLOR00ff00;

  95. DRAWTEXT(nnl,ah*0.998,'最高.'+ah+''),ALIGN0,Color0047FF,LINETHICK1;
  96. DRAWTEXT(nnl,q809,'80.9%.' +q809+''),ALIGN0,Color00FFff,LINETHICK1;
  97. DRAWTEXT(nnl,q618,'61.8%.'+q618+''),ALIGN0,Color0047FF,LINETHICK1;
  98. DRAWTEXT(nnl,q500,'50%.'+q500+''),ALIGN0,Color00FFff,LINETHICK1;
  99. DRAWTEXT(nnl,q382,'38.2%.'+q382+''),ALIGN0,Color0047FF,LINETHICK1;
  100. DRAWTEXT(nnl,q191,'19.1%.'+q191+''),ALIGN0,Color00FFff,LINETHICK1;
  101. DRAWTEXT(nnl,al*1.01,'最低.'+al+''),ALIGN0,VALIGN2,Color0047FF,LINETHICK1;
  102. END;
  103. IF W=1 THEN BEGIN
  104. {6.BOLL}
  105. BBI:=(3*C+H+L)/5;
  106. MID:EMA(BBI,26),COLOR00ff00,DOTLINE;
  107. UPPER:MID+2*STD(BBI,26),COLORRED,DOTLINE;
  108. LOWER:MID-2*STD(BBI,26),COLORFF9900,DOTLINE;
  109. 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

返回列表