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

[大智慧指标] [转载]布林+领头羊----合二为一的主图

[大智慧指标] [转载]布林+领头羊----合二为一的主图

指标用法:
蓝线上穿粉线时,最好是先上穿下底线,再上穿粉线,可作波段买入;
蓝线上穿上通道线时(尤其是红色部分),很可能是大牛股!
买入时要根据大盘,个股的趋势,千万记住:顺势而为!】

源码:

  1. DRAWGBK(c>=0),Color2B5516;平衡:EMA(C,20),CIRCLEDOT,COLORwhite;
  2. {上轨:平衡 + 2*STD(C,26),LINETHICK2,COLOR00CCFF;
  3. 下轨:平衡 - 2*STD(C,26),LINETHICK2,COLOR00ff00;}

  4. 上顶线: SMA(HIGH,21,2)*1.05,LINETHICK2,COLORWHITE;
  5. 下底线: SMA(LOW,21,2)*0.95,LINETHICK2,COLORYELLOW;
  6. 粉线: SMA(LOW,5,1),LINETHICK2,COLORMAGENTA;
  7. 蓝线: SMA(CLOSE,2,1),LINETHICK2,COLORBLUE;


  8. STICKLINE((CLOSE >平衡),平衡,平衡,1,0),LINETHICK6,color0000ff;
  9. STICKLINE((平衡 > CLOSE),平衡,平衡,1,0),LINETHICK6,colorff6600;
  10. STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0 ),COLOR0000FF;
  11. STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5 ,0 ),COLOR0000FF;
  12. STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5 ,0 ),COLOR00FF00;
  13. STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5 ,0 ),COLOR00FF00;
  14. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLORff7700;
  15. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLORff9900;
  16. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLORffbb00;
  17. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLORffcc00;
  18. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORffdd00;
  19. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORffee00;
  20. STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLORffFF00;
  21. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000055;
  22. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR000066;
  23. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR000077;
  24. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR000099;
  25. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000bb;
  26. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000dd;
  27. STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000ff;
  28. var9Q:=c= hhv(c,4)and (ref(c,1)>=ref(c,2) or ref(c,1)>=ref(c,3)) or
  29. ref(c,1)=hhv(c,4) and close>=ref(c,2) or ref(c,2)=hhv(c,4) and
  30. ref(c,3)=llv(c,4) and c>=ref(c,1) or ref(c,3)=hhv(c,4) and c>=ref(c,1)
  31. and c>=ref(c,2);

  32.      stickline(var9Q,c,(o+c)/2,7,0),color000055;
  33.      stickline(var9Q,c,(o+c)/2,6,0),color000066;
  34.      stickline(var9Q,c,(o+c)/2,5,0),color000077;
  35.      stickline(var9Q,c,(o+c)/2,4,0),color000099;
  36.      stickline(var9Q,c,(o+c)/2,3,0),color0000bb;
  37.      stickline(var9Q,c,(o+c)/2,2,0),color0000dd;
  38.      stickline(var9Q,c,(o+c)/2,1,0),color0000ff;
  39. varaQ:=c=hhv(c,4) and ref(c,1)=llv(c,4);

  40.      stickline(varaQ,c,(o+c)/2,7,0),colorff11ff;
  41.      stickline(varaQ,c,(o+c)/2,6,0),colorff33ff;
  42.      stickline(varaQ,c,(o+c)/2,5,0),colorff55ff;
  43.      stickline(varaQ,c,(o+c)/2,4,0),colorff77ff;
  44.      stickline(varaQ,c,(o+c)/2,3,0),colorff99ff;
  45.      stickline(varaQ,c,(o+c)/2,2,0),colorffbbff;
  46.      stickline(varaQ,c,(o+c)/2,1,0),colorffddff;
  47. varbQ:=c=llv(c,4) and (ref(c,1)<ref(c,2) or ref(c,1)<ref(c,3)) or
  48. ref(c,1)=llv(c,4) and c<ref(c,2) or ref(c,2)=llv(c,4) and
  49. ref(c,1)<>hhv(c,4) and c<ref(c,1) or ref(c,3)=llv(c,4) and
  50. c<ref(c,1) and c<ref(c,2);

  51.      stickline(varbQ,c,(o+c)/2,7,0),color333333;
  52.      stickline(varbQ,c,(o+c)/2,6,0),color555555;
  53.      stickline(varbQ,c,(o+c)/2,5,0),color777777;
  54.      stickline(varbQ,c,(o+c)/2,4,0),color999999;
  55.      stickline(varbQ,c,(o+c)/2,3,0),colorbbbbbb;
  56.      stickline(varbQ,c,(o+c)/2,2,0),colordddddd;
  57.      stickline(varbQ,c,(o+c)/2,1,0),colorffffff;
  58. varcQ:=ref(c,1)=llv(c,4) and c>=ref(c,2) or ref(c,2)=llv(c,4) and
  59. ref(c,1)<=ref(c,3) and ref(c,2)<ref(c,4) and c>=ref(c,1);

  60.      stickline(varcQ,o,(o+c)/2,7,0),color003300;
  61.      stickline(varcQ,o,(o+c)/2,6,0),color005500;
  62.      stickline(varcQ,o,(o+c)/2,5,0),color007700;
  63.      stickline(varcQ,o,(o+c)/2,4,0),color009900;
  64.      stickline(varcQ,o,(o+c)/2,3,0),color00bb00;
  65.      stickline(varcQ,o,(o+c)/2,2,0),color00dd00;
  66.      stickline(varcQ,o,(o+c)/2,1,0),color00ff00;
  67. vardQ:=ref(c,1)=hhv(c,4) and c<ref(c,2) or (ref(c,2)=hhv(c,4) and
  68. ref(c,1)>ref(c,3) or ref(c,3)=hhv(c,4) and ref(c,1)>ref(c,2)) and
  69. ref(c,2)>=ref(c,4) and c<ref(c,1);

  70. stickline(vardQ,o,(o+c)/2,7,0),colorff1100;
  71. stickline(vardQ,o,(o+c)/2,6,0),colorff3300;
  72. stickline(vardQ,o,(o+c)/2,5,0),colorff5500;
  73. stickline(vardQ,o,(o+c)/2,4,0),colorff7700;
  74. stickline(vardQ,o,(o+c)/2,3,0),colorff9900;
  75. stickline(vardQ,o,(o+c)/2,2,0),colorffbb00;
  76. stickline(vardQ,o,(o+c)/2,1,0),colorffdd00;

  77. Y1:=REF(EMA(DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9),3),1);
  78. DRAWtext(CROSS(CLOSE,Y1),LOW,'[进]'),ColorYELLOW;
  79. STICKLINE(CROSS(Y1,CLOSE),h*1.05,h,1,0),COLORwhite;
  80. DRAWtext(CROSS(Y1,CLOSE),HIGH*1.05,'[出]'),colorwhite;

  81. VAR1w:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
  82. VAR2w:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
  83. VAR3w:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
  84. DRAWTEXT(CROSS(VAR2w,MA(VAR3w,6)),LOW -0.6,'(买)'),colorFF99FF;
  85. DRAWTEXT(CROSS(MA(VAR3w,6),VAR1w),HIGH +0.9,'(卖)'),colorccFF13;

  86. Var3p:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
  87. STICKLINE(Var3p>90,L,L*0.92,1,0),COLORff00ff;
  88. DRAWTEXT(Var3p>90,LOW*0.92,'追'),COLORFF00FF;
  89. Ss:=MA((LOW+HIGH+CLOSE)/3,5)>REF(MA((LOW+HIGH+CLOSE)/3,5),1) AND REF(MA((LOW+HIGH+CLOSE)/3,5),1)<REF(MA((LOW+HIGH+CLOSE)/3,5),2);
  90. SC:=L<HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND H>HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND C>REF(C,1) AND C>O;
  91. MR:=SC AND COUNT(Ss,2);
  92. 买:=MR AND NOT(REF(MR,1)){,coloryellow};
  93. STICKLINE(买,L,L*0.95,1,0),COLORred;
  94. DRAWTEXT(买,L*0.95, '必涨'),COLORred;

  95. 多方:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)
  96. -3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)
  97. -SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1),2,1);
  98. STICKLINE(CROSS(78.89,多方),h+1.5,h,1,0),COLOR00FF00;
  99. DRAWTEXT(CROSS(78.89,多方),H+1.5,'顶'),COLOR00FF00;

  100. A1:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*1,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*1,5,1){,color330066};
  101. A2:=(EMA(A1,5)-REF(EMA(A1,5),1))/REF(EMA(A1,5),1)*1;
  102. A5:=(HHV(H,60)-C)/(HHV(H,60)-LLV(L,60))*1;
  103. DRAWTEXT(CROSS(A1,EMA(A1,5))AND EMA(A1,5)<A5,l*0.98,'(黑码)'),COLORyellow;

  104. Var1:=(CLOSE-LLV(LOW,24))/(HHV(HIGH,24)-LLV(LOW,24))*1;
  105. Var2:=SMA(Var1,3,1)*100;
  106. 趋势线:=SMA((SMA(Var2,3,1)*var1),3,1)*1;
  107. Var9:=CROSS(趋势线,(SMA(Var2,3,1)*var1)) AND (SMA(Var2,3,1)*var1)>8;
  108. DRAWTEXT(Var9 AND COUNT(Var9,1)=1,h+0.6,'逃'), linethick2,COLORYELLOW;
  109. DRAWICON(FILTER(CROSS(-"W&R.wr1"(14,14),(0 - 81)),10),L-0.2,1);
  110. DRAWICON(FILTER(CROSS((0 -19),-"W&R.wr1"(14,14)),10),H,2);
  111. DRAWTEXTREL(150,30,'指示:红持股 粉变盘 绿买进 蓝抛出 灰下跌'),COLORred;
复制代码



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

返回列表