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

[通达信指标/源码] [转载]极品波段主图

[通达信指标/源码] [转载]极品波段主图

代码:
  1. VAR0:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),25);
  2. VAR2:=HIGH-REF(HIGH,1);
  3. VAR3:=REF(LOW,1)-LOW;
  4. VAR4:=SUM(IF(VAR2>0 AND VAR2>VAR3,VAR2,0),25);
  5. VAR5:=SUM(IF(VAR3>0 AND VAR3>VAR2,VAR3,0),25);
  6. VAR6:=VAR4*100/VAR0;
  7. VAR7:=VAR5*100/VAR0;
  8. VAR8:=MA(ABS(VAR7-VAR6)/(VAR7+VAR6)*100,15);
  9. VAR9:=(VAR8+REF(VAR8,15))/2;
  10. BUY:=ZIG(3,10);
  11. SELL:=MA(BUY,2);
  12. DRAWICON(CROSS(BUY,SELL),L-0.1,7);
  13. DRAWICON(CROSS(SELL,BUY),H+0.1,8);

  14. STICKLINE(BUY>SELL AND O>=C,C,O,-1,0),COLORRED;
  15. STICKLINE(BUY>SELL AND O>=C,L,H,0,0),COLORRED;
  16. STICKLINE(BUY<=C,O,C,-1,1),COLORCYAN;
  17. STICKLINE(BUY<=C,O,L,0,1),COLORCYAN;
  18. STICKLINE(BUY<=C,C,H,0,1),COLORCYAN;
  19. VAR11:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
  20. VAR12:=SMA(VAR11,3,1);
  21. VAR13:=SMA(VAR12,3,1);
  22. VAR14:=VAR13 AND VAR13<20;
  23. LJB:=1/WINNER(CLOSE);
  24. STICKLINE(LJB>10,L-0.45,L-0.4,-1,1),COLORYELLOW;
  25. 平均:=(L+H)/2;
  26. KB:=ZIG(平均,10);
  27. KS:=MA(KB,2);
  28. DRAWICON(CROSS(KB,KS),L-0.2,1);
  29. DRAWICON(CROSS(KS,KB),H+0.2,2);
  30. N:=20;M:=32;P1:=80;P2:=100;
  31. VAR1:=(C+H+O+L)/4;
  32. 卖出:=XMA(VAR1,N)*(1+P1/1000),COLORFFFFFF,LINETHICK3;
  33. 买入:=XMA(VAR1,M)*(1-P2/1000),COLOR0000FF,LINETHICK3;
  34. DRAWBAND(卖出,RGB(200,50,55),卖出*1.03,RGB(0,100,50));
  35. DRAWBAND(买入,RGB(0,55,0),买入*0.97,RGB(55,55,0));
  36. 幅度:100*(卖出-买入)/买入,NODRAW;
  37. MA1:=MA(VAR1,3);
  38. STICKLINE(卖出>LOW AND 卖出
  39. STICKLINE(卖出>MIN(C,O) AND 卖出
  40. STICKLINE(卖出>LOW AND 卖出
  41. STICKLINE(卖出
  42. STICKLINE(卖出
  43. STICKLINE(买入>LOW AND 买入
  44. STICKLINE(买入>MIN(C,O) AND 买入
  45. STICKLINE(买入>LOW AND 买入
  46. DRAWTEXT(CROSS(C,卖出),卖出*1.05,'卖出'),COLOR00FFFF;
  47. 机会来临:=REF(IF((MA(C,5)-C)/C>0.04 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.04,30,0),1),COLORF00FF0,LINETHICK2;
  48. RSV2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
  49. K2:=REF(MA(RSV2,3),1)+(RSV2-REF(MA(RSV2,3),1))/3;
  50. D2:=REF(MA(K2,3),1)+(K2-REF(MA(K2,3),1))/3;
  51. J2:=3*K2-2*D2;
  52. BB1:=EMA(J2,5);
  53. BB2:=REF(BB1,1);
  54. 金叉:=CROSS(BB1,BB2);
  55. DRAWTEXT(CROSS(C,买入) AND BB1>BB2 AND C>REF(O,2),买入*0.95,'买入'),COLOR0000FF;
  56. DRAWICON(CROSS(C,买入) AND 金叉 AND 机会来临 ,LOW*0.96,26);
  57. DRAWTEXT(CROSS(C,买入) AND 金叉 AND 机会来临,LOW*0.92,'【绝杀点】'),COLOR00FF00;
复制代码



多指标金叉看涨

  1. DIFF:=EMA(CLOSE,8)-EMA(CLOSE,13);
  2. DEA:=EMA(DIFF,5);
  3. A1:=DIFF>DEA;
  4. MACD金叉:IF(A1,1,0),COLORRED;
  5. RSV1:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
  6. K:=SMA(RSV1,3,1);
  7. D:=SMA(K,3,1);
  8. DRAWICON(K>D,1,1);
  9. DRAWICON(K
  10. DRAWTEXT(ISLASTBAR=1,1,'.KDJ'),COLORFFFFFF;
  11. A2:=K>D;
  12. KDJ金叉:IF(A2,2,0),COLORRED;
  13. LC:=REF(CLOSE,1);
  14. RSI1:=(SMA(MAX(CLOSE-LC,0),5,1))/(SMA(ABS(CLOSE-LC),5,1))*100;
  15. RSI2:=(SMA(MAX(CLOSE-LC,0),13,1))/(SMA(ABS(CLOSE-LC),13,1))*100;
  16. DRAWICON(RSI1>RSI2,2.5,1);
  17. DRAWICON(RSI1
  18. DRAWTEXT(ISLASTBAR=1,2.5,'.RSI'),COLORFFFFFF;
  19. A3:=RSI1>RSI2;
  20. RSI金叉:IF(A3,3,0),COLORRED;
  21. RSV:=-(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*100;
  22. LWR1:=SMA(RSV,3,1);
  23. LWR2:=SMA(LWR1,3,1);
  24. DRAWICON(LWR1>LWR2,4,1);
  25. DRAWICON(LWR1
  26. DRAWTEXT(ISLASTBAR=1,4,'.LWR'),COLORFFFFFF;
  27. A4:=LWR1>LWR2;
  28. LWR金叉:IF(A4,4,0),COLORRED;
  29. BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
  30. DRAWICON(CLOSE>BBI,5.5,1);
  31. DRAWICON(CLOSE
  32. DRAWTEXT(ISLASTBAR=1,5.5,'.BBI'),COLORFFFFFF;
  33. A5:=CLOSE>BBI;
  34. BBI金叉:IF(A5,5,0),COLORRED;
  35. MTM:=CLOSE-REF(CLOSE,1);
  36. MMS:=100*EMA(EMA(MTM,5),3)/EMA(EMA(ABS(MTM),5),3);
  37. MMM:=100*EMA(EMA(MTM,13),8)/EMA(EMA(ABS(MTM),13),8);
  38. DRAWICON(MMS>MMM,7.5,1);
  39. DRAWICON(MMS
  40. DRAWTEXT(ISLASTBAR=1,7,'.MTM'),COLORFFFFFF;
  41. A6:=MMS>MMM;
  42. MTM金叉:IF(A6,6,0),COLORRED;
  43. 涨买入:IF((A1 AND A2 AND A3 AND A4 AND A5 AND A6) AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,1)=0,7,0),COLORYELLOW,LINETHICK2;
  44. 上涨:IF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,7,0),COLORYELLOW,LINETHICK2;
  45. 晴天:BARSLASTCOUNT(A1 AND A2 AND A3 AND A4 AND A5 AND A6),LINETHICK0;
  46. 雨天:BARSLASTCOUNT(MACD金叉+KDJ金叉+RSI金叉+LWR金叉+BBI金叉+MTM金叉>0 AND MACD金叉+KDJ金叉+RSI金叉+LWR金叉+BBI金叉+MTM金叉<21 ),LINETHICK0;
  47. 雪天:BARSLASTCOUNT(MACD金叉+KDJ金叉+RSI金叉+LWR金叉+BBI金叉+MTM金叉=0),LINETHICK0;
复制代码



改良版OBV指标

  1. VA:=IF(CLOSE>REF(MAX(O,C),1),VOL,
  2.         IF(CLOSE
  3.            ((C-L)-(H-C))/(H-L)*V));
  4. OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);
  5. MAOBV:MA(OBV,M);
复制代码



强弱分界

  1. VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
  2. 高抛: 80;
  3. VAR2:=LLV(LOW,34);
  4. VAR3:=HHV(HIGH,34);
  5. SK: EMA((VAR1-VAR2)/(VAR3-VAR2)*100,13);
  6. SD: EMA(SK,3);
  7. 低吸: 20;
  8. 强弱分界: 50;
  9. VAR4:=IF(CROSS(SK,SD),40,22);
  10. VAR5:=IF(CROSS(SD,SK),60,78);
  11. 卖出: VAR5;
  12. 买进: VAR4;
复制代码


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

返回列表