决策主力股票论坛|今日股市行情大盘分析查询

 找回密码
 立即/注册

扫一扫,访问微社区

QQ登录

只需一步,快速开始

搜索
上证指数 2679.11 +10.94 +0.41% 香港恒生 26183.529 +80.189 +0.31% 日经225 21684.59 -119.03 -0.55% 韩国综合 2092.40 +4.34 +0.21%
道琼斯 25413.22 +123.95 +0.49% 纳斯达克 7247.87 -11.16 -0.15% 英国富时 7029.29 -8.72 -0.12% 德国DAX 11354.68 +1.01 +0.01%
人民币 6.9380 -0.0012 -0.02% 原油 56.87 +0.7262% NYMEX原油 黄金 1222.4 -0.0491% COMEX黄金全球股市行情 2018年11月19日07时19分
查看: 7723|回复: 0

[通达信] 通达信神奇三线画线主图指标公式

[复制链接]
发表于 2018-9-11 21:37:09 | 显示全部楼层 |阅读模式

  1. N1:=20;
  2. N2:=10;
  3. N3:=5;
  4. AA:=REF(H,N1)=HHV(H,2*N1+1);
  5. QY:=BACKSET(AA,N1+1);
  6. CC:=FILTER(QY,N1) AND H=HHV(H,N1+1);
  7. DDD:=BARSLAST(CC);
  8. GDTS:=IF(CC,CURRBARSCOUNT,0);
  9. DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
  10. DINGBU1:=REF(DINGBUTS,DDD+1);
  11. GDCS1:=CONST(DINGBUTS);
  12. DINGBUTS1:=REF(DINGBUTS,DDD+1);
  13. GDCS2:=CONST(DINGBUTS1);
  14. DINGBU2:=REF(DINGBU1,DDD+1);
  15. MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
  16. DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF,POINTDOT,LINETHICK2;
  17. DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,POINTDOT,LINETHICK2;
  18. AA1:=REF(L,N1)=LLV(L,2*N1+1);
  19. QY1:=BACKSET(AA1,N1+1);
  20. CC1:=FILTER(QY1,N1) AND L=LLV(L,N1+1);
  21. DD1:=BARSLAST(CC1);
  22. DDTS:=IF(CC1,CURRBARSCOUNT,0);
  23. YDB:=IF(DD1,REF(L,DD1),L);
  24. DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
  25. DDCS1:=CONST(DDTS1);
  26. ZDB:=REF(YDB,DD1+1);
  27. DDTS2:=REF(DDTS1,DD1+1);
  28. DDCS2:=CONST(DDTS2);
  29. DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLOR0055FF,POINTDOT,LINETHICK2;
  30. DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORYELLOW,POINTDOT,LINETHICK2;
  31. LAA:=REF(H,N2)=HHV(H,2*N2+1);
  32. LQY:=BACKSET(LAA,N2+1);
  33. LCC:=FILTER(LQY,N2) AND H=HHV(H,N2+1);
  34. LDDD:=BARSLAST(LCC);
  35. LGDTS:=IF(LCC,CURRBARSCOUNT,0);
  36. LDINGBU:=IF(LDDD,REF(H,LDDD),H);{顶部}
  37. LDINGBUTS:=IF(LDDD,REF(LGDTS,LDDD),LGDTS);
  38. LDINGBU1:=REF(LDINGBU,LDDD+1);
  39. LGDCS1:=CONST(LDINGBUTS);
  40. LDINGBUTS1:=REF(LDINGBUTS,LDDD+1);
  41. LGDCS2:=CONST(LDINGBUTS1);
  42. LDINGBU2:=REF(LDINGBU1,LDDD+1);
  43. LMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);
  44. 压力: DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDCS1,H,1) COLORWHITE;
  45. DRAWLINE(CURRBARSCOUNT=LGDCS2,H,ISLASTBAR,REF(H,LGDCS2-1),1),COLOR0055FF,POINTDOT;
  46. DRAWLINE(CURRBARSCOUNT=LGDCS1,H,ISLASTBAR,REF(H,LGDCS1-1),1),COLORYELLOW,POINTDOT;
  47. LAA1:=REF(L,N2)=LLV(L,2*N2+1);
  48. LQY1:=BACKSET(LAA1,N2+1);
  49. LCC1:=FILTER(LQY1,N2) AND L=LLV(L,N2+1);
  50. LDD1:=BARSLAST(LCC1);
  51. LDDTS:=IF(LCC1,CURRBARSCOUNT,0);
  52. LYDB:=IF(LDD1,REF(L,LDD1),L);
  53. LDDTS1:=IF(LDD1,REF(LDDTS,LDD1),LDDTS);
  54. LDDCS1:=CONST(LDDTS1);
  55. LZDB:=REF(LYDB,LDD1+1);
  56. LDDTS2:=REF(LDDTS1,DD1+1);
  57. LDDCS2:=CONST(LDDTS2);
  58. 支撑: DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDCS1,L,1) COLORWHITE;
  59. ZGSTAR:=(压力+支撑)/2;
  60. ZGEND:=CONST((压力+支撑)/2);
  61. STARDAY:=IF(DDCS2LGDCS2,0,1);
  62. L压力: DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLGDCS1,H,1) COLORYELLOW;
  63. DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,ISLASTBAR,REF(H,LLGDCS2-1),1),COLOR0055FF,POINTDOT;
  64. DRAWLINE(CURRBARSCOUNT=LLGDCS1,H,ISLASTBAR,REF(H,LLGDCS1-1),1),COLORYELLOW,POINTDOT;
  65. LLAA1:=REF(L,N3)=LLV(L,2*N3+1);
  66. LLQY1:=BACKSET(LLAA1,N3+1);
  67. LLCC1:=FILTER(LLQY1,N3) AND L=LLV(L,N3+1);
  68. LLDD1:=BARSLAST(LCC1);
  69. LLDDTS:=IF(LLCC1,CURRBARSCOUNT,0);
  70. LLYDB:=IF(LLDD1,REF(L,LLDD1),L);
  71. LLDDTS1:=IF(LLDD1,REF(LLDDTS,LLDD1),LDDTS);
  72. LLDDCS1:=CONST(LLDDTS1);
  73. LLZDB:=REF(LLYDB,LLDD1+1);
  74. LLDDTS2:=REF(LLDDTS1,DD1+1);
  75. LLDDCS2:=CONST(LLDDTS2);
  76. L支撑: DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDDCS1,L,1) COLORYELLOW;
  77. LZGSTAR:=(L压力+L支撑)/2;
  78. LZGEND:=CONST((L压力+L支撑)/2);
  79. LSTARDAY:=IF(LLDDCS2<LLGDCS2,LLDDCS2,LLGDCS2);
  80. L中轨: DRAWLINE(CURRBARSCOUNT=LSTARDAY,LZGSTAR,ISLASTBAR,LZGEND,1),COLORYELLOW;
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即/注册

本版积分规则



手机版|今日股市行情|决策主力股票论坛 ( 鄂ICP备15023833号-1)点击这里给我发消息 鄂公网安备 42062502000040号

GMT+8, 2018-11-19 07:34

Powered by 今日股市

© 2001-2017 http://jue-ce.com/

快速回复 返回顶部 返回列表