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

[大智慧指标] [转载]操盘铁律主图

[大智慧指标] [转载]操盘铁律主图

公式如下:
  1. VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
  2. VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  3. VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  4. VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  5. VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  6. VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  7. VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  8. VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  9. VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  10. VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  11. VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  12. VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  13. STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA
  14. OR VARB OR VARC,CLOSE,REF(CLOSE,1),8,0),COLOR000055;
  15. STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA
  16. OR VARB OR VARC,CLOSE,REF(CLOSE,1),5,0),COLOR000077;
  17. STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA
  18. OR VARB OR VARC,CLOSE,REF(CLOSE,1),3,0),COLOR0000bb;
  19. STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA
  20. OR VARB OR VARC,CLOSE,REF(CLOSE,1),0,0),COLOR0000FF;
  21. DLX:=(EMA(CLOSE,17)-REF(EMA(CLOSE,17),1));
  22. DLX1:=SUM(DLX,3);
  23. DLX2:=MA(DLX1,5);
  24. VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
  25. VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  26. VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  27. VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  28. VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  29. VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  30. VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  31. VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  32. VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  33. VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  34. VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
  35. VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
  36. STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR
  37. VAR17 OR VAR18,CLOSE,REF(CLOSE,1),8,0),COLORff7700;
  38. STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR
  39. VAR17 OR VAR18,CLOSE,REF(CLOSE,1),5,0),COLORffbb00;
  40. STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR
  41. VAR17 OR VAR18,CLOSE,REF(CLOSE,1),3,0),COLORffdd00;
  42. STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR
  43. VAR17 OR VAR18,CLOSE,REF(CLOSE,1),0,0),COLORffFF00;
  44. VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR
  45. VAR17 OR VAR18,1) AND VAR1;
  46. VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1)
  47. AND VARD;
  48. STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),8,0),COLOR0055AA;
  49. STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),5,0),COLOR0077CC;
  50. STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR0099DD;
  51. STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),0,0),COLOR00BBFF; S1:=last(DLX1<DLX2 and DLX1<REF(DLX1,1));
  52. S2:=last(DLX1>=DLX2 and DLX1>=REF(DLX1,1));
  53. drawtext(S1>0,H*1.04,STR(S1)),color00FF00,LINETHICK1,align1,valign0;
  54. drawtext(S2>0,L*1,STR(S2)),color0000FF,LINETHICK1,align1,valign0;
  55. 反压线:HHV(FORCAST(CLOSE,10),18),Linethick1,CoLorEE8FFF;
  56. 年:=MA(CLOSE,26);
  57. STICKLINE((CLOSE>=年) AND (CLOSE>=OPEN),CLOSE,OPEN,4.5,0),CoLor0000AA;
  58. STICKLINE((CLOSE>=年) AND (CLOSE>=OPEN),CLOSE,OPEN,3.5,0),CoLor0000CC;
  59. STICKLINE((CLOSE>=年) AND (CLOSE>=OPEN),CLOSE,OPEN,3,0),CoLor0000EE;
  60. STICKLINE((CLOSE>=年) AND (CLOSE>=OPEN),CLOSE,OPEN,1,0),CoLor0000FF;
  61. STICKLINE((CLOSE>=年) AND (CLOSE>=OPEN),HIGH,LOW,0,0),CoLor0000FF;
  62. STICKLINE((CLOSE>=年) AND (CLOSE<OPEN),CLOSE,OPEN,4.5,0),CoLor0000AA;
  63. STICKLINE((CLOSE>=年) AND (CLOSE<OPEN),CLOSE,OPEN,3.5,0),CoLor0000CC;
  64. STICKLINE((CLOSE>=年) AND (CLOSE<OPEN),CLOSE,OPEN,3,0),CoLor0000EE;
  65. STICKLINE((CLOSE>=年) AND (CLOSE<OPEN),CLOSE,OPEN,1,0),CoLor0000FF;
  66. STICKLINE((CLOSE>=年) AND (CLOSE<OPEN),OPEN,HIGH,0,0),CoLor0000FF;
  67. STICKLINE((CLOSE>=年) AND (CLOSE<OPEN),CLOSE,LOW,0,0),CoLor0000FF;
  68. STICKLINE((CLOSE<年) AND (CLOSE>OPEN),CLOSE,OPEN,4.5,0),CoLorAAAA00;
  69. STICKLINE((CLOSE<年) AND (CLOSE>OPEN),CLOSE,OPEN,3.5,0),CoLorCCCC00;
  70. STICKLINE((CLOSE<年) AND (CLOSE>OPEN),CLOSE,OPEN,3,0),CoLorEEEE00;
  71. STICKLINE((CLOSE<年) AND (CLOSE>OPEN),CLOSE,OPEN,1,0),CoLorFFFF00;
  72. STICKLINE((CLOSE<年) AND (CLOSE<=OPEN),CLOSE,OPEN,4.5,0),CoLorAAAA00;
  73. STICKLINE((CLOSE<年) AND (CLOSE<=OPEN),CLOSE,OPEN,3.5,0),CoLorCCCC00;
  74. STICKLINE((CLOSE<年) AND (CLOSE<=OPEN),CLOSE,OPEN,3,0),CoLorEEEE00;
  75. STICKLINE((CLOSE<年) AND (CLOSE<=OPEN),CLOSE,OPEN,1,0),CoLorFFFF00;
  76. STICKLINE((CLOSE<年) AND (CLOSE<=OPEN),HIGH,LOW,0,0),CoLorFFFF00;
  77. STICKLINE((CLOSE<年) AND (CLOSE>OPEN),CLOSE,HIGH,0,0),CoLorFFFF00;
  78. STICKLINE((CLOSE<年) AND (CLOSE>OPEN),OPEN,LOW,0,0),CoLorFFFF00;
  79. VAR1:=((OPEN-REF(CLOSE,1))/(REF(CLOSE,1)))*(100);
  80. VAR2:=(VAR1>3);
  81. VAR3:=(VAR1<(-2));
  82. 跳空高开:DRAWTEXT(VAR2,(LOW)*(0.995),'高开'),CoLorFEBAF5;
  83. 跳空低开:DRAWTEXT(VAR3,(HIGH)*(1.015),'低开'),CoLor00FF00;
  84. VARA:=100-((90)*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21));
  85. VARB:=100-((90)*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21));
  86. VARC:=100-MA(((100)*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6)),34);
  87. DRAWTEXT(CROSS(VARB,MA(VARC,6)),(LOW)*0.995,'B'),CoLor208FFF;
  88. DRAWTEXT(CROSS(HIGH,年) AND CROSS(VARB,MA(VARC,6)),(LOW)*0.995,'B'),CoLor00FFFF;
  89. DRAWTEXT(CROSS(年,LOW) AND (CLOSE<=年),(HIGH)*1.015,'S'),CoLorFFFF00;
  90. {------------------ ------------------};
  91. {操盘铁律}   
  92. YC:=REF(CLOSE,1);  
  93. 止损价位:(YC*1.0035*97+0.1)/99.65,COLORRED,LINETHICK0;
  94. DRAWTEXTREL(10,30,'上市日期:'+NUMTOSTRN(REF(YEAR,BARSCOUNT(C)-1),0)+'年'+NUMTOSTRN(REF(MONTH,BARSCOUNT(C)-1),0)+'月'+NUMTOSTRN(REF(DAY,BARSCOUNT(C)-1),0)+'日'),COLOR00ffff,LINETHICK2;DRAWTEXTREL(800,920,'**'),Colorffffff,LINETHICK2;   
  95. WW:=BARSLAST(DISPSTATUS=1);
  96. DRAWTEXTREL(250,30,'◇目前可见K线:'+NUMTOSTRN(WW+1,0)+'天'),COLORYELLOW,LINETHICK2;
  97. DRAWTEXTABS(5,26,'★ ==============='),COLORRED;   
  98. DRAWTEXTABS(5,42,'操 '),COLORRED;   
  99. DRAWTEXTABS(5,58,'盘 '),COLORRED;   
  100. DRAWTEXTABS(5,74,'铁'),COLORRED;   
  101. DRAWTEXTABS(5,90,'律'),COLORRED;   
  102. DRAWTEXTABS(5,106,'★ ==============='),COLORRED;   
  103. DRAWTEXTABS(5,42,'   千股千评:'+SELFSTRING('千股千评')),colorYellow;   
  104. DRAWTEXTABS(5,58,'   红1买入 B点加仓 绿1卖岀'  ),colorYellow;   
  105. DRAWTEXTABS(5,74,'   止损价'+NUMTOSTR(止损价位)+'元'),colorYellow;   
  106. DRAWTEXTABS(5,90,'   上阶梯工作 下阶梯休息'),color00FFFF;   
  107. M1:=3;   
  108. M2:=19;  
  109. JJ:=(CLOSE+HIGH+LOW)/3;   
  110. A:=EMA(JJ,10);   
  111. B:=REF(A,1);
  112. STICKLINE(A>B ,A ,B ,10 ,0 ),COLOR0000FF;
  113. STICKLINE(A<B ,B ,A ,10 ,0 ),COLOR00FF00;
复制代码



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

返回列表