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

[通达信指标/源码] 布林带主图 附图成交量[通达信公式源码]

[通达信指标/源码] 布林带主图 附图成交量[通达信公式源码]

组图配合使用,绝对没有未来函数,每一个波段都看的清清楚楚,真正能抓住低点,并能逃顶,不要太贪哟

1;布林带主图

  1. MA7:EMA(CLOSE,7),COLORFFFFFF;
  2. MID:MA(CLOSE,20),COLORYELLOW;
  3. UPPER:MID+2*STD(CLOSE,20),COLORRED,DOTLINE;
  4. LOWER:MID-2*STD(CLOSE,20),COLORGREEN,DOTLINE;
  5. EMA1:EMA(C,5),COLORFFFFFF,LINETHICK0;
  6. EMA2:EMA(C,21),COLORYELLOW,LINETHICK0;
  7. STICKLINE(C>=OPEN,C,OPEN,3.5,0),COLOR0000AA;
  8. STICKLINE(C>=OPEN,C,OPEN,3.0,0),COLOR0000CC;
  9. STICKLINE(C>=OPEN,C,OPEN,2.0,0),COLOR0000EE;
  10. STICKLINE(C>=OPEN,C,OPEN,1.5,0),COLOR0000FF;
  11. STICKLINE(C>=OPEN,C,OPEN,0.5,0),COLORFF00FF;
  12. STICKLINE(C>=OPEN,C,OPEN,0.4,0),COLORFF00FF;
  13. STICKLINE(C>=OPEN,C,OPEN,0.2,0),COLORFF00FF;
  14. STICKLINE(OPEN>=C,C,OPEN,3.5,0),COLORAAAA00;
  15. STICKLINE(OPEN>=C,C,OPEN,3.0,0),COLORBBBB00;
  16. STICKLINE(OPEN>=C,C,OPEN,2.0,0),COLORCCCC00;
  17. STICKLINE(OPEN>=C,C,OPEN,1.5,0),COLOREEEE00;
  18. STICKLINE(OPEN>=C,C,OPEN,0.5,0),COLORFFFF00;
  19. STICKLINE(OPEN>=C,C,OPEN,0.4,0),COLORFFEE00;
  20. STICKLINE(OPEN>=C,C,OPEN,0.2,0),COLORFFEE00;
  21. VAR31:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
  22. VAR41:=CROSS(VAR31,0.9);
  23. VAR51:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
  24. VAR61:=CROSS(VAR51,0.9);
  25. 压力:= REF(HIGH,BARSLAST(VAR41));
  26. STICKLINE(C,REF(HIGH,BARSLAST(VAR41)),REF(HIGH,BARSLAST(VAR41)),8,1),COLORFFFFFF;
  27. 支撑:= REF(LOW,BARSLAST(VAR61));
  28. STICKLINE(C,REF(LOW,BARSLAST(VAR61)),REF(LOW,BARSLAST(VAR61)),8,1),COLORYELLOW;
  29. DRAWICON(CROSS(EMA1,EMA2),EMA2*1.00,5);
  30. DRAWICON(CROSS(EMA2,EMA1),EMA2*1.00,6);
  31. DRAWICON(CROSS(C,EMA1),L*1.00,7);
  32. DRAWICON(CROSS(EMA1,C),H*1.00,8);
  33. DRAWICON(CROSS(C,EMA2),L*1.00,7);
  34. DRAWICON(CROSS(EMA2,C),H*1.00,8);
  35. DRAWICON(CROSS(C,压力),L*1.00,1);
  36. DRAWICON(CROSS(支撑,C),H*1.00,2);
复制代码



2;附图成交量

  1. X:=CONST(DATE);
  2. Y:=IF(DATE<X, 240, FROMOPEN);
  3. 上证昨日额亿:REF("999999$AMOUNT",1)/100000000,NODRAW;
  4. 上证今日额亿:"999999$AMOUNT"/Y*240/100000000,NODRAW;
  5. 上证预计额比:"999999$AMOUNT"/Y*240/REF("999999$AMOUNT",1),NODRAW;
  6. 123456, COLORBLACK, NODRAW;
  7. 个股预计量万:VOL/Y*240/10000,NODRAW;
  8. 预计量比:VOL/Y*240/REF(VOL,1),COLORYELLOW,NODRAW;
  9. 总交易日:=BARSCOUNT(CLOSE);
  10. STICKLINE((VOL/Y*240)=CONST(LLV(VOL,60)),CONST(HHV(VOL,70)),(VOL/Y*240),2,0),COLORYELLOW;
  11. STICKLINE((VOL/Y*240)=CONST(LLV(VOL,总交易日)),CONST(HHV(VOL,70)),0,0.5,0),COLOR006432;
  12. DRAWTEXT((VOL/Y*240)=CONST(LLV(VOL,60)) AND (VOL/Y*240)>CONST(LLV(VOL,总交易日)),CONST(HHV(VOL,70))*0.7,'量底'),COLORYELLOW;
  13. DRAWTEXT((VOL/Y*240)=CONST(LLV(VOL,60)) AND (VOL/Y*240)=CONST(LLV(VOL,总交易日)),CONST(HHV(VOL,70))*0.7,'绝对量底'),COLORYELLOW;
  14. NOTEXTVOLUME:VOL,VOLSTICK;
  15. NOTEXTVOL5:MA(VOL,5);
  16. NOTEXTVOL10:MA(VOL,10);
  17. {上证成交额直观描述}
  18. 预计变化:=(上证预计额比-1)*100;
  19. 预计1:=CONST(IF(预计变化>=40,1,0));
  20. 预计2:=CONST(IF(预计变化>=30 AND 预计变化<40,1,0));
  21. 预计3:=CONST(IF(预计变化>=20 AND 预计变化<30,1,0));
  22. 预计4:=CONST(IF(预计变化>=10 AND 预计变化<20,1,0));
  23. 预计5:=CONST(IF(预计变化>=5 AND 预计变化<10,1,0));
  24. 预计6:=CONST(IF(ABS(预计变化)<5,1,0));
  25. 预计7:=CONST(IF(预计变化<=-5 AND 预计变化>-10,1,0));
  26. 预计8:=CONST(IF(预计变化<=-10 AND 预计变化>-20,1,0));
  27. 预计9:=CONST(IF(预计变化<=-20 AND 预计变化>-30,1,0));
  28. 预计10:=CONST(IF(预计变化<=-30 AND 预计变化>-40,1,0));
  29. 预计11:=CONST(IF(预计变化<=-40,1,0));
  30. 位置1:=PERIOD=5 AND CURRBARSCOUNT=34;
  31. DRAWTEXT(预计1=1 AND 位置1, CONST(HHV(NOTEXTVOLUME,70))*0.88, '大盘猛烈放量40%以上'), COLORFF00FF;
  32. DRAWTEXT(预计2=1 AND 位置1, CONST(HHV(NOTEXTVOLUME,70))*0.88, '大盘大幅放量30-40%'), COLORFF00FF;
  33. DRAWTEXT(预计3=1 AND 位置1, CONST(HHV(NOTEXTVOLUME,70))*0.88, '大盘放量20-30%'), COLORFF00FF;
  34. DRAWTEXT(预计4=1 AND 位置1, CONST(HHV(NOTEXTVOLUME,70))*0.88, '大盘放量10-20%'), COLORFF00FF;
  35. DRAWTEXT(预计5=1 AND 位置1, CONST(HHV(NOTEXTVOLUME,70))*0.88, '大盘轻微放量5-10%'), COLORFF00FF;
  36. DRAWTEXT(预计6=1 AND 位置1, CONST(HHV(NOTEXTVOLUME,70))*0.88, '大盘成交额小幅波动±5%'), COLORFF00FF;
  37. DRAWTEXT(预计7=1 AND 位置1, CONST(HHV(NOTEXTVOLUME,70))*0.88, '大盘轻微缩量5-10%'), COLORFF00FF;
  38. DRAWTEXT(预计8=1 AND 位置1, CONST(HHV(NOTEXTVOLUME,70))*0.88, '大盘缩量10-20%'), COLORFF00FF;
  39. DRAWTEXT(预计9=1 AND 位置1, CONST(HHV(NOTEXTVOLUME,70))*0.88, '大盘缩量20-30%'), COLORFF00FF;
  40. DRAWTEXT(预计10=1 AND 位置1, CONST(HHV(NOTEXTVOLUME,70))*0.88, '大盘大幅缩量30-40%'), COLORFF00FF;
  41. DRAWTEXT(预计11=1 AND 位置1, CONST(HHV(NOTEXTVOLUME,70))*0.88, '大盘猛烈缩量40%以上'), COLORFF00FF;
  42. {大盘KDJ,RSI超跌,牛熊市都能用}
  43. 上证J超跌:=CONST(IF("999999$KDJ.J"<=5,1,0));
  44. 上证R超跌:=CONST(IF("999999$RSI.RSI1"<=20,1,0));
  45. DRAWTEXT(上证J超跌=1 AND 上证R超跌=0 AND CURRBARSCOUNT=15, CONST(HHV(NOTEXTVOLUME,70))*0.6, '上证KDJ超跌(小于5),有反弹预期');
  46. DRAWTEXT(上证J超跌=0 AND 上证R超跌=1 AND CURRBARSCOUNT=15, CONST(HHV(NOTEXTVOLUME,70))*0.6, '上证RSI超跌(小于20),有反弹预期');
  47. DRAWTEXT(上证J超跌=1 AND 上证R超跌=1 AND CURRBARSCOUNT=15, CONST(HHV(NOTEXTVOLUME,70))*0.6, '上证KDJ-RSI都超跌(小于5或20)');
复制代码



3;趋势顶底
Z 1  60  5  n 1  60  9
  1. HIGH1:=IF(HIGH<REF(H,1),(H+L)*0.5,HIGH);
  2. LOW2:=IF(LOW>=(REF(L,1)+REF(L,2))/2,CLOSE,LOW);
  3. LOW1:=IF(LOW>=REF(LOW,1),CLOSE,LOW);
  4. CLOSE1:=IF(CLOSE>=REF(CLOSE,1),CLOSE,(HIGH1+LOW2)*0.5);
  5. VARA:=IF(CLOSE=CLOSE,(CLOSE+LOW+OPEN+HIGH+HIGH1+LOW2)/6,AMOUNT/(100*VOL));
  6. VARU1:=LLV(LOW1,30);
  7. VARA1:=HHV(HIGH1,30);
  8. VARU2:=LLV(LOW1,21);
  9. VARA2:=HHV(HIGH1,21);
  10. CC:=MA((VARA-VARU2)/(VARA2-VARU2)*100,11);
  11. CC1:=EMA(CC,7),COLOR336699;
  12. B:=EMA((VARA-VARU1)/(VARA1-VARU1)*101,13);
  13. B1:=EMA(B,8);
  14. 移动平均A:STICKLINE(B-B1>0 ,B*1.03,B1,2,1),COLOR336699;
  15. 移动平均B:STICKLINE(B-B1<=0,B*1.03,B1,2,1),COLOR777777;
  16. KDCM:=100*(1-WINNER(C));
  17. 空头筹码FILLRGN:=(C>1,KDCM,0),COLORCCFF66;
  18. DDCM:=100*WINNER(C);
  19. 多头筹码FILLRGN:=(C>1,DDCM,0),COLORCCCCFF;
  20. 获利平均值:EMA(100*WINNER(C),20),COLOR00DD00,LINETHICK2;
  21. 获利99:=MA(COST(99),5);
  22. 获利80:=MA(COST(80),5);
  23. 均线5日:=MA(C,5);
  24. 获利20:=MA(COST(20),5);
  25. 获利1:=MA(COST(1),5);
  26. A11:=(获利99-获利80)/获利80*100;
  27. A2:=(获利80-获利20)/获利20*100;
  28. AA3:=(获利20-获利1)/获利1*100;
  29. A4:=IF(A2<10,95,95 );
  30. A5:=IF(A2<15,50,50 );
  31. A6:=IF(A2<20,25,25 );
  32. 密集度:A2,COLORFF1177,LINETHICK2;
  33. 高密集:=A4,COLOR00AAFF,LINETHICK1;
  34. 中密集:=A5,COLORFF00FF,LINETHICK1;
  35. 低密集:=A6,COLORE66878,LINETHICK1;
  36. 金牛牛:=IF(获利平均值>=密集度,获利平均值,DRAWNULL),COLOR00CCFF,LINETHICK2;
  37. YK:=BACKSET(获利平均值>REF(获利平均值,1),5);
  38. YKNO:=BACKSET(获利平均值<REF(获利平均值,1),5);
  39. 金牛金牛:IF(获利平均值>=密集度 AND YK,获利平均值,DRAWNULL),COLOR0000FF,LINETHICK3;
  40. 泥牛泥牛:IF(获利平均值<密集度 AND YKNO,获利平均值,DRAWNULL),CROSSDOT,COLORFFAA77,LINETHICK2;
  41. STICKLINE(获利平均值>=密集度 AND YK,获利平均值,密集度,0,1),COLOR0033FF;
  42. A:=(3*CLOSE+LOW+OPEN+HIGH)/6;
  43. D1:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)
  44. +13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
  45. +7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
  46. REF(A,20))/211;
  47. D2:=EMA(D1,2);
  48. D3:=EMA(D2,2);
  49. K1:=EMA(D3,2);
  50. VARAA:=ZIG(3,Z);
  51. RSV:=(VARAA-LLV(VARAA,N))/(HHV(VARAA,N)-LLV(VARAA,N))*100;
  52. K:SMA(RSV,3,1),COLORFFFFFF,LINETHICK1;
  53. D:SMA(K,3,1),COLORCC33DD,LINETHICK1;
  54. J:=3*K-2*D,COLORFFFFFF,LINETHICK1;
  55. 金叉RSI:=DRAWICON(CROSS("RSI.RSI2#WEEK","RSI.RSI3#WEEK"),50,1);
  56. 波段升:STICKLINE(CROSS(D1,K1) AND CC>=CC1,1,30,0.1,0),COLOREE99FF;
  57. 波段下:STICKLINE(CROSS(K1,D1) AND CC<CC1,100,73,0.1,0),COLORFFFF00;
  58. DIFFR:=EMA(CLOSE,12)-EMA(VARA,26);
  59. DEAR:=EMA(DIFFR,9),COLORFFFFFF,LINETHICK1;   
  60. MACDA:=EMA(CLOSE,12)-EMA(CLOSE,26);
  61. MACDD:=EMA(CLOSE,9)-EMA(CLOSE,12);
  62. MACDB:=EMA(CLOSE,9)-EMA(CLOSE1,12);
  63. MACDH:=EMA(CLOSE,12)-EMA(CLOSE1,26);
  64. MACDC:=EMA(CLOSE,8)-EMA(CLOSE1,15);
  65. MACDM:=EMA(CLOSE,7)-EMA(CLOSE,11);
  66. 中线持仓:=IF(CLOSE>=SAR(4,2,20),SAR(4,2,20),DRAWNULL);
  67. 中线空仓:=IF(CLOSE<SAR(4,2,20),SAR(4,2,20),DRAWNULL);
  68. DXB:=COUNT(CROSS(MACDM,0) OR CROSS(MACDD,0) OR CROSS(MACDA,0),15)>=2;
  69. DXC:=COUNT(CROSS(MACDM,0) OR CROSS(MACDD,0) OR CROSS(MACDA,0) OR CROSS(MACDH,0),20)>=2;
  70. DXD:=COUNT(CROSS(MACDM,0) OR CROSS(MACDC,0) OR CROSS(MACDH,0) OR CROSS(MACDB,0),20)>=2;
  71. DXE:=COUNT(CROSS(MACDM,0) OR CROSS(MACDH,0) OR CROSS(MACDB,0) OR CROSS(MACDD,0) OR
  72. CROSS(MACDA,0),30)>=4;
  73. MD:=BACKSET(DEAR>=REF(DEAR,1),2);
  74. 卖点:IF(PEAKBARS(3,15,1)=1,67,100),COLOR00FF44,LINETHICK2;
  75. 买点:IF(TROUGHBARS(3,15,1)=0 AND HIGH>LOW+0.01,33,0),COLORAA00FF,LINETHICK2;
  76. STICKLINE((MACDC>=0 OR MACDH>=0) AND 中线持仓 AND (DXB OR DXC OR DXD OR DXE) AND MD
  77. ,10,0,3,0),COLOR0000FF;
  78. MCST:=DMA(AMOUNT/(100*VOL),VOL/CAPITAL);
  79. DIF:=EMA(EMA(CLOSE,18)-EMA(CLOSE,34),11);
  80. MACD:=EMA(EMA(DIF,11),11),COLOR58FF58;
  81. DEF:=2*(DIF-MACD),COLORFFFF00,LINETHICK0;
  82. STICKLINE(C>=MCST AND 获利平均值>=密集度 AND YK,8,2,1.6,0),COLOR00EEFF;
  83. 金牛:DRAWTEXT(CROSS(获利平均值,密集度),获利平均值,'※金牛出现★'),COLOR00FFFF;{上穿密集度-金牛出现};
复制代码

20155514523113953.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

返回列表