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

[大智慧指标] [转载]猛虎掘金主图指标公式

[大智慧指标] [转载]猛虎掘金主图指标公式

005.png


公式源码
  1. QIXIAN:='指标简要说明: ';
  2. DRAWTEXTREL(0,0,QIXIAN+' --短线向中线的转换,【持股线】是小趋势,【波段线】是大趋势。'),color808080;
  3. mms:=ma(sma((l+h+2*c)/4-ref((l+h+2*c)/4,1),5,1)/sma(abs((l+h+2*c)/4-ref((l+h+2*c)/4,1)),5,1)*100,1)+50;
  4. g1:=if(-mms>95,0,20);
  5. uoo:=(-(((CLOSE-LLV(CLOSE,7))/(HHV(CLOSE,7)-LLV(CLOSE,7))*100=100)>0 and g1)+1);
  6. KS:=(((CLOSE - EMA(CLOSE,13)) / EMA(CLOSE,13)) * (0 - 100));
  7. KS1:=if(BARSCOUNT(c)=1,c/10000,(1-C/SMA(C,13,1))*100);
  8. 趋势线:=EMA(((KS / 10) + EMA(CLOSE,10)),3);
  9. AA:= - 100 * (趋势线 - CLOSE) / 趋势线;
  10. AC:=(EMA(AA,5) );
  11. SSL:=EMA(CLOSE,3);
  12. MMV:=ma(close,24);
  13. MM:=MMV;
  14. STICKLINE(((SSL > MM) ),SSL,MM,0.1,0),colorred;
  15. 波段线:MMV,LINETHICK2,COLORMAGENTA;
  16. VAR2Y:=(((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) * 100);
  17. VAR3Y:=(((CLOSE - REF(OPEN,29)) / REF(OPEN,29)) * 100);
  18. VAR4Y:=REF(CLOSE,1);
  19. VAR5Y:=((SMA(MAX((CLOSE - VAR4Y),0),6,1) / SMA(ABS((CLOSE - VAR4Y)),6,1)) * 100);
  20. VAR6Y:=((SMA(MAX((CLOSE - VAR4Y),0),12,1) / SMA(ABS((CLOSE - VAR4Y)),12,1)) * 100);
  21. VAR7Y:=((SMA(MAX((CLOSE - VAR4Y),0),24,1) / SMA(ABS((CLOSE - VAR4Y)),24,1)) * 100);
  22. VAR8Y:=(((CLOSE - LLV(LOW,45)) / (HHV(HIGH,45) - LLV(LOW,45))) * 100);
  23. VAR9Y:=SMA(VAR8Y,3,1);
  24. VARAY:=SMA(VAR9Y,3,1);
  25. VARBY:=((3 * VAR9Y) - (2 * VARAY));
  26. VARCY:=(CROSS(VAR5Y,10) AND (VAR3Y < (0 - (28 * 20))));
  27. VARDY:=((100 - CROSS(76,VAR5Y)) AND (VAR3Y > (5 * 20)));
  28. DRAWICON(((CROSS(76,VAR5Y) AND (VAR3Y > 5)) ),(HIGH * 1.01),5),colorFFFFFF;
  29. VAREY:=((((CROSS(VAR9Y,VARAY) AND (VARAY < 10)) AND (VAR3Y < (0 - 30))) AND (VAR2Y > 3)) * 30);
  30. VARFY:= - ((((VARAY < 11) AND (VAR5Y < 15)) AND (VAR3Y < (0 - 26))) * 10);
  31. DRAWICON((CROSS(VARFY,(0 - 9))),(LOW * 0.998),4);
  32. 能量线:=DMA(((CLOSE + OPEN) / 2),(VOL / (SMA(VOL,4,1) * 4)));
  33. 上开:=o;
  34. 上收:=c;
  35. 上高:=h;
  36. 上低:=l;
  37. JJ:=(上开+上高+上低)/3;
  38. A:=EMA(JJ,3);
  39. B:REF(A,1),POINTDOT,COLORYELLOW;
  40. 持股线:A,COLORYELLOW,LINETHICK1;
  41. STICKLINE(((SSL < MM) ),波段线,持股线,0.1,0),COLOrffbbff;
  42. FILLRGN(a,b,A>=B),colorred;
  43. FILLRGN(a,b,A<B),colorgreen;
  44. 选手A:=MA(上收,3);
  45. 阻力线A:=MA(REF(HHV(上收,6),1),3);
  46. 支撑线A:=MA(REF(LLV(上收,3),1),3);
  47. t1:=MA(上收,20)>=REF(MA(上收,20),1);
  48. t2:=CROSS(选手A,支撑线A) AND 阻力线A/支撑线A>100/100 AND t1;
  49. t3:=CROSS(阻力线A,选手A) AND 阻力线A/支撑线A>100/100;
  50. 选手:=MA(上收,2);
  51. 阻力线:MA(REF(HHV(上收,30),1),2),COLOR0000FF,LINETHICK2;
  52. 支撑线:MA(REF(LLV(上收,30),1),2),COLOR00FF00,LINETHICK2;
  53. t4:=CROSS(选手,支撑线) AND 阻力线/支撑线>110/100;
  54. t5:=CROSS(阻力线,选手) AND 阻力线/支撑线>110/100;
  55. Var1:=(上收-LLV(上低,27))/(HHV(上高,27)-LLV(上低,27))*100;
  56. Var2:=SMA(Var1,3,1);
  57. Var3:=SMA(Var2,3,1);
  58. Var4:=SMA(Var3,3,1);
  59. {K线}
  60. STICKLINE(C>=O,C,O,7,0),COLORRED;
  61. STICKLINE(C>=O,C,O,4,0),COLORB0B0FF;
  62. STICKLINE(C>=O,C,O,2,0),COLORYELLOW;
  63. STICKLINE(C>=O,H,L,0,0),COLORYELLOW;
  64. STICKLINE(C<=O,C,O,7,0),colorFFAA00;
  65. STICKLINE(C<=O,C,O,4,0),COLORffbbff;
  66. STICKLINE(C<=O,C,O,2,0),COLORffbbff;
  67. STICKLINE(C<=O,H,L,0,0),COLORffbbff;
  68. {K线卖提示}
  69. Qc0:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
  70. stickline(Qc0>=91 AND (CLOSE-LLV(CLOSE,5))/(HHV(CLOSE,5)-LLV(CLOSE,5))*100>99.9,open,close,3,0),COLOR3366FF;
  71. stickline(Qc0>=91 AND (CLOSE-LLV(CLOSE,5))/(HHV(CLOSE,5)-LLV(CLOSE,5))*100>99.9,H,L,0.5,0),COLOR3366FF;
  72. {K线买提示}
  73. Var111:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
  74. VarD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
  75. VarE :=REF(VarD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  76. VarF :=REF(VarE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  77. Var10 :=REF(VarF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  78. Var11:=REF(Var10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  79. Var12:=REF(Var11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  80. Var13:=REF(Var12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  81. Var14:=REF(Var13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  82. Var15:=REF(Var14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  83. Var16:=REF(Var15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  84. Var17:=REF(Var16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  85. Var18:=REF(Var17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  86. Var19:=REF(VarD OR VarE OR VarF OR Var10 OR Var11 OR Var12 OR Var13 OR Var14 OR Var15 OR Var16 OR Var17 OR Var18,1) AND Var1;
  87. 趋势线1:=FORCAST(CLOSE,7);
  88. Fk:=100*(C-REF(C,1))/REF(C,1);
  89. pk1:=IF(C<REF(O,1) AND fk<0,1,0);
  90. pk2:=IF(C<REF(O,2) AND fk<0,1,0);
  91. stickline((Pk1=0 AND REF(Pk1,1)=1 AND Pk2=0 AND REF(Pk2,1)=1)AND(趋势线1>REF(趋势线1,1)OR 持股线>REF(持股线,1)),open,CLOSE,3,0),COLORred;
  92. stickline((Pk1=0 AND REF(Pk1,1)=1 AND Pk2=0 AND REF(Pk2,1)=1)AND(趋势线1>REF(趋势线1,1)OR 持股线>REF(持股线,1)),H,L,0.5,0),COLORred;

  93. pk3:=(((CLOSE / OPEN) > 1.04) AND (CLOSE <(SMA(HIGH,21,2) * 1.05))) AND ((CLOSE - REF(CLOSE,1)) > 0);
  94. STICKLINE(pk3 AND(趋势线1>REF(趋势线1,1)OR 持股线>REF(持股线,1)),CLOSE,OPEN,3,0),COLORred;
  95. STICKLINE(pk3 AND(趋势线1>REF(趋势线1,1)OR 持股线>REF(持股线,1)),H,L,0.5,0),COLORred;
  96. STICKLINE(Var19 AND(趋势线>REF(趋势线1,1)OR 持股线>REF(持股线,1)),CLOSE,OPEN,3,0),COLORred;
  97. STICKLINE(Var19 AND(趋势线>REF(趋势线1,1)OR 持股线>REF(持股线,1)),H,L,0.5,0),COLORred;
  98. 买进价:=((c-ref(ma(c,6),1))/6+ma(c,6))*1.004;
  99. 买进条件:=cross(c,买进价) and 买进价>ref(买进价,1);
  100. STICKLINE(买进条件 AND 波段线>持股线 AND 持股线>REF(持股线,1),L,L*0.998,7,0),COLORWHITE;
  101. 买线:=EMA(C,2);
  102. 卖线:=EMA(SLOPE(C,21)*20+C,42);
  103. DRAWTEXT(CROSS(买线,卖线)AND 阻力线>=REF(阻力线,1),支撑线,'★'),COLOR00FFFF;
  104. stickline(cross(买线,卖线),open,close,3,0),color00ffff;
  105. stickline(cross(买线,卖线),h,l,0.5,0),color00ffff;
复制代码

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

返回列表