当前位置:→ 公式网 > 通达信公式 > 正文  公式解密、改选股等业务 联系点击查看详情...

以下是通达信美人眼MACD-副图源码帖图(无源码的请下载附件导入)

 通达信美人眼MACD-副图源码帖图

C/C++ Code复制内容到剪贴板
  1. {玩股美人眼MACD源码}   
  2. LONG:= 26;   M:=9;   SHORT:=12;   
  3. DIFF1:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);   
  4. DEA1:=EMA(DIFF1,M);   
  5. MACD:=2*(DIFF1-DEA1);   
  6. DIFF:EMA(CLOSE,SHORT) - EMA(CLOSE,LONG),COLORFF00FF,LINETHICK2;   
  7. DEA:EMA(DIFF1,M),COLORWHITE,LINETHICK2;   
  8. AH:HHV(DIFF1,55),COLOR6600FF,LINETHICK2;   
  9. IF(AH,AH,DRAWNULL),COLORWHITE,POINTDOT,LINETHICK2;   
  10. DRAWICON(REF(AH=DIFF1,1) AND DIFF<REF(DIFF1,1),AH,8);   
  11. AL:LLV(DIFF1,55),COLOR248A24,LINETHICK2;   
  12. IF(AL,AL,DRAWNULL),COLORWHITE,POINTDOT,LINETHICK2;   
  13. DRAWICON( REF(AL=DIFF1,1) AND DIFF>REF(DIFF1,1),AL,7);   
  14. {●60零上金叉:IF(CROSS(DIFF,DEA) AND DIFF>0,0.3,0),COLOR6600FF,POINTDOT;   
  15. STICKLINE(●60零上金叉,DIFF,AH,4,0),COLOR6600FF;}   
  16. ■零下金叉:IF(CROSS(DIFF,DEA) AND DIFF<-0.001,0.3,0),COLORWHITE,POINTDOT;   
  17. STICKLINE(■零下金叉,0.1,0.15,6,0),COLORWHITE;   
  18. JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));   
  19. ■二次金叉:IF(CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,0.2,0),COLOR3C86CC,POINTDOT;   
  20. STICKLINE(■二次金叉,0.15,0.2,6,0),COLOR3C86CC;   
  21. A3:=CROSS(DIFF,DEA) AND DEA<0;   
  22. ■零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10) AND DEA<0,0.05,0),COLORF58F98,POINTDOT;   
  23. STICKLINE(■零下二次金叉,0.25,0.3,6,0),COLORF58F98;   
  24. A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));   
  25. ■底背离:IF(REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),0.1,0),COLORFFFF00;   
  26. 底背离1:STICKLINE(REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),0,AL,4,0),COLOR00FF00;   
  27. STICKLINE(■底背离,0.2,0.25,6,0),COLORFFFF00;   
  28. {DRAWLINE(A1=0,DEA,■底背离,DEA,0),COLORYELLOW};   
  29. {A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));   
  30. 顶背离:STICKLINE(REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF),0,DIFF,4,0),COLORBLACK;   
  31. DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN;}   
  32. DD:=C=HHV(C,100);   
  33. EE:=DEA1< REF(DEA1,1) AND REF(DEA1< REF(DEA1,1),1)=1;   
  34. CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;    
  35. 上升背离:(CC AND EE)*AH,STICK,LINETHICK2,COLORFF00FF;   
  36. 顶背离:(DD AND EE AND DEA1< HHV(DEA1,100))*AH,STICK,LINETHICK2,COLORYELLOW;   
  37. DRAWTEXT(顶背离,DEA1/2,'顶背离'),COLORYELLOW;   
  38. FF:=C=LLV(C,100);   
  39. GG:= DEA1> REF(DEA1,1) AND REF(DEA1> REF(DEA1,1),1)=1;   
  40. LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;    
  41. 下降背离:(LL AND GG)*AL,STICK,LINETHICK2,COLORWHITE;   
  42. 底背离:(FF AND GG AND DEA1> LLV(DEA1,100))*AL,STICK,LINETHICK2,COLOR6600FF;   
  43. DRAWTEXT(底背离,DEA1/2,'底背离'),COLOR6600FF;   
  44. IF(DIFF<0,DIFF,0),COLORFF00FF,LINETHICK2;   
  45. IF(DIFF<0,0,DIFF),COLORYELLOW,LINETHICK2;   
  46. IF(DIFF<DEA,DIFF,DEA),COLORFFFF00,LINETHICK2;   
  47. IF(DIFF>DEA,DEA,DEA),COLORWHITE,LINETHICK2;   
  48. STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,4,0 ),COLOR00CC00;   
  49. STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,3,0 ),COLOR00DD00;   
  50. STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00EE00;   
  51. STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1,0 ),COLOR00FF00;   
  52. STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,3,0 ),COLOR0000DD;   
  53. STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0000EE;   
  54. STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1,0 ),COLOR0000FF;   
  55. STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,3,0 ),COLOR33DFDD;   
  56. STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLOR33EFDD;   
  57. STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1,0 ),COLOR33FFDD;   
  58. STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,3,0 ),COLORFFAA00;   
  59. STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFBB00;   
  60. STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1,0 ),COLORFFCC00;   
  61. VAR1:=HHV(DEA,53);   
  62. VAR2:=LLV(DEA,30);   
  63. VAR3:=DEA-(DIFF-DEA);   
  64. UP:IF(DIFF>VAR1 AND DEA=VAR1,MAX(LLV(VAR1,10),VAR3),VAR1),COLORBB9A00,LINETHICK2;   
  65. DN:IF(DIFF<VAR2 AND DEA=VAR2,MIN(HHV(VAR2,10),VAR3),VAR2),COLORAA00BB,LINETHICK2;   
  66. 美人开眼:=CROSS(DIFF ,DEA ) AND CROSS( DIFF,DN ) AND DN<0;   
  67. 美人开眼A:美人开眼*AL,STICK,LINETHICK4,COLOR8080FF;   
  68. DRAWTEXT(美人开眼,DN,'美人开眼'),COLOR8080FF,LINETHICK2;   
  69. 美人收眼:=CROSS(DEA ,DIFF ) AND CROSS( UP,DIFF ) AND DIFF<UP;   
  70. 美人收眼A:美人收眼*AH,STICK,LINETHICK4,COLOR9CA010;   
  71. DRAWTEXT(美人收眼,DN,'美人收眼'),COLOR9CA010,LINETHICK2;   
  72. {用于大智慧时删除以下源码}   
  73. AL,COLOR248A24,LINETHICK2;   
  74. DRAWBAND(MA(DIFF,2),RGB(0,58,224),DIFF,RGB(255,0,46));   
  75. DIFF,COLORFF00FF,LINETHICK1;   
  76. DEA,COLORWHITE,LINETHICK3;   


{公式在线提供:www.gszx.com.cn}



关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - RSS订阅 - TOP
湘ICP备09016573号-3 增值电信业务经营ICP许可证:湘B2-20210269 湘公网安备43108102000039号
Copyright © 铭网科技,All Rights Reserved.
股票公式,股票指标,股票软件,股票知识