通达信MACD通用指标公式

N1:=6;
N2:=18;
N3:=54;
N4:=162;
L2:=MA(C,3);
L3:=MA(C,60);
L4:=MA(C,120);
L5:=MA(C,40);
VAR1:=SUM(WINNER(CLOSE)*100,13)/10-(SUM(WINNER(CLOSE)*100,1)/20+10);
线在量上必大涨: IF(crOSS(L2,L3) AND CLOSE<L4,-60,0);
VAR2:=CLOSE/L5*100<78;
VAR3:=CLOSE/L3*100<74;
VAR4:=HIGH>(LOW*1.051);
VAR5:=VAR4 AND COUNT(VAR4,5)>1;
VAR6:=CLOSE/HHV(HIGH,BARSCOUNT(CLOSE>0))*100;
VAR7:=EMA(EMA(CLOSE,13),13);
控盘:= (VAR7-REF(VAR7,1))/REF(VAR7,1)*5000;
A1:=CROSS(控盘,0);
控盘1:IF(A1,100,0),COLORBLUE,LINETHICK1;
DRAWTEXT(控盘1>0,-20,'☆控盘☆'),COLORBLUE;
DIFF:(EMA(CLOSE,5) - EMA(CLOSE,20))*600,COLORRED,LINETHICK1;
DEA:EMA(DIFF,10), COLORCYAN,LINETHICK1;
IF(DIFF<=DEA,DIFF,DRAWNULL)COLORCYAN,LINETHICK1;
IF(DEA<=DIFF AND DEA>0,DEA,DRAWNULL)COLORRED,LINETHICK1;
ddiFF:=(EMA(CLOSE,5) - EMA(CLOSE,20));
ddeA:=EMA(DDIFF,10);
macd:=1200*(DDIFF-DDEA);
MacD1:=2*(DDIFF-DDEA)*600,COLORRED,LINETHICK1;
MACD2:=MA(MACD1,3);
MACDL:=HHV(MACD2,13);
STICKLINE(MACDL<MACD1,MACD1,MACD2,3,0),COLORBLUE;{翻转前的绿柱}
多空生命:=(MA(CLOSE,100)+MA(CLOSE,100)+MA(CLOSE,100)+MA(CLOSE,1000))/4;
日线:=MA(CLOSE,5);
VAR03:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
VAR04:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
VAR05:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
VAR06:=(VAR03+VAR04+VAR05)/3;
VAR07:=EMA(VAR06,5);
指标:EMA(EMA(VAR03,5),5)*3, COLORSTICK;
VAR08:=IF(VAR06<=-20,10,0);
VAR09:=HHV(VAR08,10);
STICKLINE(VAR08=10,100,10,1.0,0),COLOR000000;{周日线接近底部黑柱}
VARA:=IF(VAR09 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
DRAWTEXT(VAR08=10 AND FILTER(VAR08=10,5),100{15},'接近底部'),LINETHICK2,COLORRED;
STICKLINE(VAR08=10 AND FILTER(VAR08=10,5),-1.6{20},100{-10},1.0,0),COLORFF00FF;
DRAWTEXT(VARA=20 AND VAR08=10,100,'☆底部区域☆'),LINETHICK2,COLORBLUE;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)
+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR010:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)
+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR011:=VARF<REF(VAR010,1) AND vol>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(VAR011 AND COUNT(VAR011,30)=1,-30,'★大资金建仓★'),LINETHICK1,COLORFF00FF;
STICKLINE(VAR011 AND COUNT(VAR011,30)=1,1,100,5,1),LINETHICK2,COLORRED;
{紫}
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2.6,0 ),COLOR990099;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2.3,0 ),COLORAE00AE;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2.0,0 ),COLORBE00BE;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1.6,0 ),COLORCE00CE;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1.3,0 ),COLORDE00DE;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1.0,0 ),COLOREE00EE;
{红}
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2.6,0 ),COLOR3535FF;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2.3,0 ),COLOR5555FF;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2.0,0 ),COLOR8585FF;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1.6,0 ),COLOR9B9BFF;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1.3,0 ),COLORACACFF;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1.0,0 ),COLORBBBBFF;
{蓝}
STICKLINE(MACD>=REF(MACD,1)AND MACD<0,0,MACD,2.6,0 ),COLORFFAA00;
STICKLINE(MACD>=REF(MACD,1)AND MACD<0,0,MACD,2.3,0 ),COLORFFBB11;
STICKLINE(MACD>=REF(MACD,1)AND MACD<0,0,MACD,2.0,0 ),COLORFFCC22;
STICKLINE(MACD>=REF(MACD,1)AND MACD<0,0,MACD,1.6,0 ),COLORFFDD33;
STICKLINE(MACD>=REF(MACD,1)AND MACD<0,0,MACD,1.3,0 ),COLORFFEE44;
STICKLINE(MACD>=REF(MACD,1)AND MACD<0,0,MACD,1.0,0 ),COLORFFFF55;
{绿}
STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,2.6,0 ),COLOR003300;
STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,2.3,0 ),COLOR006600;
STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,2.0,0 ),COLOR009900;
STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,1.6,0 ),COLOR00B000;
STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,1.3,0 ),COLOR00CE00;
STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,1.0,0 ),COLOR00E300;
{画图标}
DRAWICON(CROSS(DIFF,DEA)AND(DIFF>=0),DIFF,33);
{CR上60手机}
DRAWICON(CROSS(CR,60),60,20);
{rsi上20苹果}
DRAWICON(CROSS(RSI,15),40,26);
{kd上15笑脸}
DRAWICON(CROSS(KD,20),20,24);
{cci上-200钻石}
DRAWICON( CROSS(CCI,-200) AND CCI>=REF(CCI,1),0,25);
{顶底}
DRAWTEXT(MACD>=0 AND CR>=150 AND KD>=80 AND RSI>=80 ,80,'【卖】'),COLORBLUE;
DRAWTEXT(MACD<=0 AND CR<=80 AND RSI<=20 AND KD<=20,5,'【买】'),COLOR000000;
{起爆点}
DIF1:=EMA(DCLOSE,2)-EMA(DCLOSE,3);
DEA1:=EMA(DIF1,4);
AAA1:=(DIF1-DEA1)*2*60;
起爆点:=AAA1-REF(AAA1,1);
DRAWICON(CROSS(起爆点,4),60,9);
{起跌点}
起跌点:=REF(AAA1,1)-AAA1;
DRAWICON(CROSS(起跌点, 4),60,15);



未来函数检测结果如下:
该公式包含未来函数:WINNER
该公式包含未来函数:DCLOSE
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

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

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