通达信黄金分割优化版主图 源码

[复制链接]
查看240 | 回复0 | 2022-7-24 08:58:50 | 显示全部楼层 |阅读模式

 通达信黄金分割优化版主图 源码

{牛牛指标网提供:www.tdx001.com}

复制内容到剪贴板
  1. N:=75;P:=5;P1:=10;   
  2. {N为多少天内的高低值参数,我以自已的初始K线根数定义。P1、P2为短、长支撑压力取点参数}   
  3. A1:=REF(H,P)=HHV(H,2*P+1);   
  4. B1:=FILTER(A1,P);   
  5. C1:=BACKSET(B1,P+1);   
  6. D1:=FILTER(C1,P);   
  7. E1:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);    
  8. F1:=E1>REF(E1,1);   
  9. 短压:DRAWLINE(D1,H,F1,H,1),COLORCYAN;   
  10. A2:=REF(L,P)=LLV(L,2*P+1);   
  11. B2:=FILTER(A2,P);   
  12. C2:=BACKSET(B2,P+1);   
  13. D2:=FILTER(C2,P);   
  14. E2:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);   
  15. F2:=E2>REF(E2,1);   
  16. 短支:DRAWLINE(D2,L,F2,L,1),COLORLIRED;   
  17. AA1:=REF(H,P1)=HHV(H,2*P1+1);   
  18. BB1:=FILTER(AA1,P1);   
  19. CC1:=BACKSET(BB1,P1+1);   
  20. DD1:=FILTER(CC1,P1);   
  21. EE1:=BACKSET(ISLASTBAR,BARSLAST(DD1)+1);    
  22. FF1:=EE1>REF(EE1,1);   
  23. 长压:DRAWLINE(DD1,H,FF1,H,1),COLORGREEN;   
  24. AA2:=REF(L,P1)=LLV(L,2*P1+1);   
  25. BB2:=FILTER(AA2,P1);   
  26. CC2:=BACKSET(BB2,P1+1);   
  27. DD2:=FILTER(CC2,P1);   
  28. EE2:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);   
  29. FF2:=EE2>REF(EE2,1);   
  30. 长支:DRAWLINE(DD2,L,FF2,L,1),COLORRED;   
  31. STICKLINE(C>=O,C,O,3,0),COLOR000045;   
  32. STICKLINE(C>=O,C,O,2.5,0),COLOR000065;   
  33. STICKLINE(C>=O,C,O,2,0),COLOR000085;   
  34. STICKLINE(C>=O,C,O,1.5,0),COLOR0000A5;   
  35. STICKLINE(C>=O,C,O,1,0),COLOR0000C5;   
  36. STICKLINE(C>=O,C,O,0.5,0),COLOR0000E5;   
  37. STICKLINE(C>=O,H,L,0,0),COLOR0000F5;   
  38. STICKLINE(C<O,C,O,3,0),COLOR353500;   
  39. STICKLINE(C<O,C,O,2.5,0),COLOR454500;   
  40. STICKLINE(C<O,C,O,2,0),COLOR555500;   
  41. STICKLINE(C<O,C,O,1.5,0),COLOR656500;   
  42. STICKLINE(C<O,C,O,1,0),COLOR757500;   
  43. STICKLINE(C<O,C,O,0.5,0),COLOR858500;   
  44. STICKLINE(C<O,H,L,0,0),COLOR959500;   
  45. 高:=REFDATE(HHV(H,N),DATE);    
  46. 低:=REFDATE(LLV(L,N),DATE);   
  47. H1:=高-(高-低)*0.191;   
  48. H2:=高-(高-低)*0.382;   
  49. H3:=高-(高-低)*0.5;   
  50. H4:=高-(高-低)*0.618;   
  51. H5:=高-(高-低)*0.809;   
  52. DRAWTEXT(CURRBARSCOUNT=1,高,'高'),COLORGREEN;   
  53. DRAWTEXT(CURRBARSCOUNT=1,H1,'809'),COLORCYAN;   
  54. DRAWTEXT(CURRBARSCOUNT=1,H2,'618'),COLORGRAY;   
  55. DRAWTEXT(CURRBARSCOUNT=1,H3,'中'),COLORYELLOW;   
  56. DRAWTEXT(CURRBARSCOUNT=1,H4,'382'),COLORLIRED;   
  57. DRAWTEXT(CURRBARSCOUNT=1,H5,'191'),COLORMAGENTA;   
  58. DRAWTEXT(CURRBARSCOUNT=1,低,'低'),COLORRED;   
  59. STICKLINE(CURRBARSCOUNT=13,高,高,100,-1),COLORGREEN;   
  60. STICKLINE(CURRBARSCOUNT=13,H1,H1,100,-1),COLORCYAN;   
  61. STICKLINE(CURRBARSCOUNT=13,H2,H2,100,-1),COLORGRAY;   
  62. STICKLINE(CURRBARSCOUNT=13,H3,H3,100,-1),COLORYELLOW;   
  63. STICKLINE(CURRBARSCOUNT=13,H4,H4,100,-1),COLORLIRED;   
  64. STICKLINE(CURRBARSCOUNT=13,H5,H5,100,-1),COLORMAGENTA;   
  65. STICKLINE(CURRBARSCOUNT=13,低,低,100,-1),COLORRED;  

DA71637248.png

DA71637248.png

回复

使用道具 举报

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

本版积分规则