通达信MACD重心买卖副图指标公式源码


{日macd}
vol1:=6;
VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
obv1:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);
OBV2:=EMA(OBV1,3)-MA(OBV1,9);
OBV3:=EMA(IF(OBV2>0,OBV2,0),3);
Mac3:=MA(C,3);
SHORT:=11;LONG:=21;MID:=7;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG)COLORWHITE;
DEA:EMA(DIF,MID)COLORYELLOW;
MACD:(DIF-DEA)*2,NODRAW;
STICKLINE(OBV3>REF(OBV3,1) AND MAC3>REF(MAC3,1),0,MACD,0.1,0),COLORRED;
吸:=XLPL.NOTEXT吸;
拉:=XLPL.NOTEXT拉;
派:=XLPL.NOTEXT派;
落:=XLPL.NOTEXT落;
STICKLINE(吸,0,MACD,0.1,0),COLORRED;
STICKLINE(拉,0,MACD,0.1,0),COLORRED;
STICKLINE(派,0,MACD,0,0),COLORGREEN;
STICKLINE(落,0,MACD,0,0),COLORGREEN;
主力买1:IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED;
主力买2:IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLOR00FF00;
{重心}
A1:=(CLOSE*2+HIGH+LOW)/4;
A2:=EMA(A1,13)-EMA(A1,34);
A3:=EMA(A2,5);
重心:2*(A2-A3)*3.8,NODRAW;
J:=重心;
{MACD}
DIF1:=EMA(CLOSE,11) - EMA(CLOSE,21);
DEA1:=EMA(DIF1,7);
MACD1:=2*(DIF1-DEA1);
{kdj}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,NODRAW;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J1:=3*K-2*D;
{CII}
TYP:=(HIGH + LOW + CLOSE)/3;
cci:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
买:=crOSS(CCI,-100),NODRAW;
{rsi}
LC:=REF(CLOSE,1);
RSI2:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(Abs(CLOSE-LC),6,1)*100,NODRAW;
R6:=(SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100),NODRAW;
MR持股:=K>D AND K>REF(K,1) AND DIF1>DEA1 AND DIF1>REF(DIF1,1) AND R6>50 AND R6>REF(R6,1) AND C>bbi AND BBI>REF(BBI,1),NODRAW;
IF(MR持股,J/3,DRAWNULL),COLORMAGENTA,LINETHICK2;
{买点}
负100买点:K>D AND K>REF(K,1) AND DIF1>DEA1 AND DIF1>REF(DIF1,1) AND R6>50 AND R6>REF(R6,1)AND 买 AND 重心>REF(重心,1),NODRAW;
M交叉临界:=351/28*(EMA(DIF1,9)-11/13*EMA(C,12)+25/27*EMA(C,26)),NODRAW;
K交叉点:=(3*REF(D,1)-2*REF(K,1))/100*(HHV(H,9)-LLV(L,9))+LLV(L,9),NODRAW;
长线持股:=K>D AND DIF1>DEA1 AND R6>50 AND C>BBI,NODRAW;
IF(长线持股,J/2,DRAWNULL)COLOR9966FF,LINETHICK1;



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

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

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

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