查看: 101|回复: 0

[通达信] 决策曲线(通达信)

[复制链接]

353

主题

354

帖子

1093

积分

金牌会员

Rank: 6Rank: 6

积分
1093
发表于 2019-4-15 15:00:29 | 显示全部楼层 |阅读模式
指标
适用软件: 通达信
画图位置: 副图
未来函数: 无未来
更多交流: QQ群:50203834 公众号:金股典/jingudian 
  1. MA1:=MA(CLOSE,5);
  2. MA2:=MA(CLOSE,10);
  3. P01:=IF(MA1>MA2,1,IF(MA2>MA1,-1,0));
  4. MA3:=MA(CLOSE,3);
  5. MA4:=MA(CLOSE,5);
  6. P02:=IF(MA3>MA4,1,IF(MA4>MA3,-1,0));
  7. MA5:=MA(CLOSE,12);
  8. MA6:=MA(CLOSE,50);
  9. P03:=IF(MA5>MA6,1,IF(MA6>MA5,-1,0));
  10. {KDJ}
  11. RSV:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;
  12. K:=EMA(RSV,3);
  13. D:=EMA(K,3);
  14. P04:=IF(K>D,1,IF(D>K,-1,0));
  15. {MACD}
  16. DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
  17. DEA:=EMA(DIF,9);
  18. MACD:=(DIF-DEA)*2;
  19. P05:=IF(DIF>DEA,1,IF(DEA>DIF,-1,0));
  20. {TRIX}
  21. TRR:=EMA(EMA(EMA(CLOSE,12),12),12);
  22. TRIX:=(TRR-REF(TR,1))/REF(TRR,1)*100;
  23. MATRIX:=MA(TRIX,9) ;
  24. P06:=IF(TRIX>MATRIX,1,IF(MATRIX>TRIX,-1,0));
  25. {DMI}
  26. TR1:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),7);
  27. HD :=HIGH-REF(HIGH,1);
  28. LD :=REF(LOW,1)-LOW;
  29. DMP:=EMA(IF(HD>0 AND HD>LD,HD,0),7);
  30. DMM:=EMA(IF(LD>0 AND LD>HD,LD,0),7);
  31. PDI:= DMP*100/TR;
  32. MDI:= DMM*100/TR;
  33. ADX:= EMA(ABS(MDI-PDI)/(MDI+PDI)*100,7);
  34. ADXR:=EMA(ADX,7);
  35. P07:=IF(PDI>MDI AND ADX>PDI AND ADX>50,3,
  36. IF(PDI<MDI AND ADX>MDI AND ADX>50,-3,0));{9}
  37. {RSI}
  38. LC:=REF(CLOSE,1);
  39. RSI1:=EMA(MAX(CLOSE-LC,0),5)/EMA(ABS(CLOSE-LC),5)*100;{10}
  40. P08:=IF(RSI1>80,1,IF(RSI1<20,-1,0));{10}
  41. {CCI}
  42. TYP:=(HIGH+LOW+CLOSE)/3;
  43. CCI:=(TYP-MA(TYP,8))/(0.015*AVEDEV(TYP,8));
  44. P09:=IF(CCI>180,2,IF(CCI<-180,-2,0));{12}
  45. {W%R}
  46. WR1:=(CLOSE-LLV(LOW,6))/(HHV(HIGH,6)-LLV(LOW,6))*100;
  47. P10:= IF(WR1>80,1,IF(WR1<20,-1,0));{13}
  48. {OSC}
  49. OSC:=100*(CLOSE-MA(CLOSE,20));
  50. P11:=IF(OSC>0,1,IF(OSC<0,-1,0));{14}
  51. {MTM}
  52. MOM:=CLOSE-REF(CLOSE,7);
  53. P12:=IF(MOM>0,1,IF(MOM<0,-1,0));{15}
  54. {DPO}
  55. DPO:=CLOSE-REF(MA(CLOSE,11),11/2+1);
  56. P13:=IF(DPO>0,1,IF(DPO<0,-1,0));{16}
  57. {布林线}
  58. MB:=MA(CLOSE,12);
  59. R:=(CLOSE-MB)*(CLOSE-MB);
  60. X1:=MA(R,12);
  61. X2:=SQRT(X1);
  62. D1:=1;
  63. UPPER:=MB+(D1*X2);
  64. LOWER:=MB-(D1*X2);
  65. P14:=IF(CLOSE>UPPER,2,IF(CLOSE<LOWER,-2,0));{18}
  66. {BRAR}
  67. BR:=SUM(MAX(0,HIGH-REF(CLOSE,1)),14)/SUM(MAX(0,REF(CLOSE,1)-LOW),14)*100;
  68. AR:=SUM(HIGH-OPEN,14)/SUM(OPEN-LOW,14)*100;
  69. P15:=IF(BR>350 OR AR>180,3,IF(BR<45 OR AR<45,-3,0));{21}
  70. {VR}
  71. TH:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,0),14);
  72. TL:=SUM(IF(CLOSE<REF(CLOSE,1),VOL,0),14);
  73. TQ:=SUM(IF(CLOSE=REF(CLOSE,1),VOL,0),14);
  74. VR:=0100*(TH*2+TQ)/(TL*2+TQ);
  75. P16:=IF(VR>350,3,IF(VR<45,-3,0));{24}
  76. {WVAD}
  77. WVAD:=SUM((CLOSE-OPEN)/(HIGH-LOW)*VOL,6)/10000;
  78. P17:=IF(WVAD>0,1,IF(WVAD<0,-1,0));{25}
  79. {EMV}
  80. VOLUME:=MA(VOL,4)/VOL;
  81. MID:=100*(HIGH+LOW-REF(HIGH+LOW,1))/(HIGH+LOW);
  82. EMV:=MA(MID*VOLUME*(HIGH-LOW)/MA(HIGH-LOW,4),4);
  83. P18:=IF(EMV>0,1,IF(EMV<0,-1,0));{26}
  84. {OBV}
  85. VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
  86. OBV:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);
  87. MAOBV:=EMA(OBV,24);
  88. P19:=IF(OBV>MAOBV,1,IF(OBV<MAOBV,-1,0));{27}
  89. {PVI}
  90. PVI:= PVI,COLORWHITE;
  91. MPVI:=EMA(PVI,24),COLORYELLOW;
  92. P20:=IF(PVI>MPVI,1,IF(PVI<MPVI,-1,0));{28}
  93. {NVI}
  94. NVI:=NVI,COLORWHITE;
  95. MNVI:=EMA(NVI,24),COLORYELLOW;
  96. P21:=IF(NVI>MNVI,2,IF(NVI<MNVI,-2,0));{30}
  97. {MASS}
  98. MASS:=SUM(MA(HIGH-LOW,9)/MA(MA(HIGH-LOW,9),9),25);
  99. MA7:=MA(CLOSE,9);
  100. P22:=IF(MA7>REF(MA7,1) AND MASS>26.5,2,IF(MA7<REF(MA7,1)
  101. AND MASS<26.5,-2,0));{32}
  102. {VHF}
  103. NUM:=ABS(HHV(HIGH,15)-LLV(LOW,15));
  104. DEN:=SUM(ABS(CLOSE-REF(CLOSE,1)),15);
  105. VHF:=IF(DEN=0,0,NUM/DEN);
  106. VHF1:=EMA(VHF,240);
  107. P23:=IF(VHF>VHF1,1,IF(VHF<VHF1,-1,0));{33}
  108. {PUCU}
  109. PU:=MA(CLOSE,13);
  110. CU:=MA(VOL,13);
  111. PU1:=(PU-REF(PU,1))/REF(PU,1)*100;
  112. CU1:=(CU-REF(CU,1))/REF(CU,1)*100;
  113. 逆时针曲线:=PU1+CU1;
  114. P24:=IF(逆时针曲线>REF(逆时针曲线,1),1,IF(逆时针曲线<REF(逆时针曲线,1),-1,0));
  115. {ASI}
  116. LC2:=REF(CLOSE,1);
  117. AA:=ABS(HIGH-LC2);
  118. BB:=ABS(LOW-LC2);
  119. CC:=ABS(HIGH-REF(LOW,1));
  120. DD:=ABS(LC2-REF(OPEN,1));
  121. R2:=IF(AA>BB AND AA>CC,AA+BB/2+DD/4,IF(BB>CC AND BB>AA,BB+AA/2+DD/4,CC+DD/4));
  122. X01:=(CLOSE-LC2+(CLOSE-OPEN)/2+LC2-REF(OPEN,1));
  123. SI:=16*X01/R2*MAX(AA,BB);
  124. ASI:=SUM(SI,0),COLORWHITE;
  125. MASI:=MA(ASI,6),COLORYELLOW;
  126. P25:=IF(CLOSE<HHV(CLOSE,13) AND ASI=HHV(ASI,13),1,IF(CLOSE>LLV(CLOSE,13) AND ASI=LLV(ASI,13),-1,0));
  127. {BIAS}
  128. BIAS1 :=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
  129. P26:=IF(BIAS1>10,1,IF(BIAS1<-10,-1,0));
  130. 决策曲线: (36+P01+P02+P03+P04+P05+P06+P07+P08+P09+P10+P11+P12+P13+P14+P15+P16+
  131. P17+P18+P19+P20+P21+P22+P23+P24+P25+P26)*1.36;
  132. MAJCQX:MA(决策曲线,3);
  133. STICKLINE(C>0,36,36,10,0),COLOR00FF00;
  134. STICKLINE(C>0,56,56,10,0),COLORFF00FF;
  135. STICKLINE(C>0,71,71,10,0),COLORRED;
  136. STICKLINE(C>0,44,44,10,0),COLORYELLOW;
复制代码

000011.jpg
回复

使用道具 举报

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

本版积分规则

手机版| 感谢您的支持,本条链接自定义

Powered by Discuz! X3.1 © 2001-2015 Comsenz Inc. GMT+8, 2019-4-25 22:01 , Processed in 0.028657 second(s), 10 queries , Eaccelerator On.

135股票论坛 ( 京ICP备14020393号-1 )
  • 凭安信用认证
  • 中网可信网站权威数据库
  • 360网站安全检测
  • 360网站点评
  • 百度网站点评
快速回复 返回顶部 返回列表