把KDJ和MACD来个二合一 发生奇特功效幅图 通达信源码

源码

{---KDJ(9.3.3)----}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
 K:SMA(RSV,3,1),COLORFF9900;
 D:SMA(K,3,1),COLOR00FF00,LINETHICK2;
 J:3*K-2*D,COLOR00FFFF,LINETHICK1;
 DRAWBAND(J,RGB(60,0,60),D,RGB(60,80,60));
 3*K-2*D,COLOR00FFFF,LINETHICK1;
 SMA(K,3,1),COLOR00FF00,LINETHICK2;
 IF(D>REF(D,1),D,DRAWNULL),COLOR0000FF,LINETHICK2;
 {----MACD(26.12.9)----EMA---}
 {DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));
 DEA:=EMA(DIFF,9);
 MACD:2*(DIFF-DEA),LINETHICK0;}
 {----MACD(26.12.9)----WMA----}
 DIFF:=WMA(CLOSE,12)-WMA(CLOSE,26);
 DEA:=WMA(DIFF,9);
 MACD:2*(DIFF-DEA),LINETHICK0;
 Q:=100;
 SZ:=MACD>REF(MACD,1);
 STICKLINE(SZ,REFDATE(HHV(J,0),DATE),REFDATE(-50,DATE),6,0),COLORDD0000; {-------波段背景------};
STICKLINE(SZ,0,MACD*1*Q,1.0.05,0),COLOR0000CC;
 STICKLINE(SZ,0,MACD*0.8*Q,1,0),COLOR0011FF;
 STICKLINE(SZ,0,MACD*0.6*Q,1.3,0),COLOR0055FF;
 STICKLINE(SZ,0,MACD*0.4*Q,1.6,0),COLOR0099FF;
 STICKLINE(SZ,0,MACD*0.2*Q,2,0),COLOR00DDFF;
 XD:=MACD<REF(MACD,1);
 STICKLINE(XD,0,MACD*1*Q,1.0.05,0),COLORFF0000;
 STICKLINE(XD,0,MACD*0.8*Q,1,0),COLORFF3311;
 STICKLINE(XD,0,MACD*0.6*Q,1.3,0),COLORFF7733;
 STICKLINE(XD,0,MACD*0.4*Q,1.6,0),COLOR999933;
 STICKLINE(XD,0,MACD*0.2*Q,2,0),COLOR88DD00;

 SMA(K,3,1),COLOR00FF00,LINETHICK2;
 3*K-2*D,COLOR00FFFF,LINETHICK1;
 DRAWBAND(J,RGB(60,0,60),D,RGB(60,80,60));
 3*K-2*D,COLOR00FFFF,LINETHICK1;
 SMA(K,3,1),COLOR00FF00,LINETHICK2;
 IF(D>REF(D,1),D,DRAWNULL),COLOR0000FF,LINETHICK2;
 0,DOTLINE;80,DOTLINE;
 {高抛低吸}
SJ:=WMA(((2*C+H+L)/4-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2);
 ZJ:=WMA(0.618*REF(SJ,1)+0.382*SJ,2);
 MR:=CROSS(SJ,ZJ) AND SJ<30;
 MC:=CROSS(ZJ,SJ) AND SJ>70;
 AA8:=100*EMA(EMA(C-REF(C,1),8),5)/EMA(EMA(ABS(C-REF(C,1)),8),5);
买:=LLV(AA8,2)=LLV(AA8,8) AND COUNT(AA8<0,2) AND CROSS(AA8,WMA(AA8,2));
 DRAWTEXT(MR ,J,'↖加仓1,'),COLOR00FFFF;
 DRAWTEXT(FILTER(买,5),J,'↖加仓  2.'),COLOR00FFFF;

卖:=HHV(AA8,2)=HHV(AA8,8) AND COUNT(AA8>0,2) AND CROSS(WMA(AA8,2),AA8);
 DRAWTEXT(MC,J,'↙减仓1,'),COLOR00FF00;
 DRAWTEXT(FILTER(卖,5),J,'↙减仓  2'),COLOR00FF00;




来函数检测结果如下:
该公式没有未来函数

解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图