在线检测未来函数

通达信周引用MACD指标公式

来源:Internet,编辑:股旁网,2023-07-28

本文指标含有选股公式如下:
股旁网此处内容已被隐藏,请输入验证码查看内容。
验证码:
请关注本站微信公众号,回复“88”,获取验证码。
提示:在微信里搜索“股旁网”或者微信扫描右侧二维码。

周K:="macd.DIF#WEEK"(12,26,9),NODRAW;
周D:="MACD.DEA#WEEK"(12,26,9),NODRAW;
DRAWBAND(周K,RGB(150,0,150),周D,RGB(0,100,200));
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9),COLORWHITE;
MACD:(DIF-DEA)*2,COLORSTICK;
金叉CORO:=crOSS(DIF,DEA);
DRAWICON(金叉CORO,DIF,1);
VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5);
QG:=DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1);
W3:STICKLINE(MACD>QG,MACD,QG,1,0),COLORYELLOW;
入1:=IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2;
入2:=IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWTEXT(REF(MACD,1)>0 AND MACD<0,MACD-0.01,'1')COLORCDCDB4;
DRAWTEXT(REF(MACD,2)>0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'2')COLORCDCDB4;
DRAWTEXT(REF(MACD,3)>0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'3')COLORCDCDB4;
DRAWTEXT(REF(MACD,4)>0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'4')COLORCDCDB4;
DRAWTEXT(REF(MACD,5)>0 AND REF(MACD,4)<0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'5')COLORCDCDB4;
DRAWTEXT(REF(MACD,6)>0 AND REF(MACD,5)<0 AND REF(MACD,4)<0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'6')COLORCDCDB4;
DRAWTEXT(REF(MACD,1)<0 AND MACD>0,MACD-0.01,'1')COLORRED;
DRAWTEXT(REF(MACD,2)<0 AND REF(MACD,1)>0 AND MACD>0,MACD-0.01,'2')COLORRED;
DRAWTEXT(REF(MACD,3)<0 AND REF(MACD,2)>0 AND REF(MACD,1)>0 AND MACD>0,MACD-0.01,'3')COLORRED;
DRAWTEXT(REF(MACD,4)<0 AND REF(MACD,3)>0 AND REF(MACD,2)>0 AND REF(MACD,1)>0 AND MACD>0,MACD-0.01,'4')COLORRED;
DRAWTEXT(REF(MACD,5)<0 AND REF(MACD,4)>0 AND REF(MACD,3)>0 AND REF(MACD,2)>0 AND REF(MACD,1)>0 AND MACD>0,MACD-0.01,'5')COLORRED;
DRAWTEXT(REF(MACD,6)<0 AND REF(MACD,5)>0 AND REF(MACD,4)>0 AND REF(MACD,3)>0 AND REF(MACD,2)>0 AND REF(MACD,1)>0 AND MACD>0,MACD-0.01,'6')COLORRED;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA21:=MA(C,21);
MA60:=MA(C,60);
B3:=MAX(MA(C,5),MAX(MA(C,10), MA(C,20)));
B31:=MIN(MA(C,5),MIN(MA(C,10), MA(C,20)));
A3:=C>B3 AND L<B31 AND C>REF(C,1) AND C>O;
强势:= C/REF(C,1)>1.07;
涨幅:=IF(C>1.07*REF(C,1),1,0);
均价:=(HIGH+LOW+OPEN+CLOSE)/4;
分水岭:=MA(3*均价-2*SMA(均价,2,1),12);
P:=1;
A01:=(C-LLV(LOW,3))/(HHV(HIGH,3)-LLV(LOW,3));
A11:=SMA(A01,2,1);
A21:=SMA(A11,2,1);
A31:=3*A11-2*A21 ;
A41:=2*A31-0.5;
乾坤线:=C*(1-(A41-A21)/15);
A:=(L+H)/2;
VARR2:=(H+L+O+2*C)/5;
CHH低吸线:=EMA(SLOPE(VARR2,21)*20+VARR2,55);
BB:=LLV(H,1);
逃顶线:=FORCAST(FORCAST(BB,15),15);
做多趋势:=IF(均价>分水岭,均价,分水岭);
支撑:=REVERSE(做多趋势)+2*分水岭;
FF:=EMA(CLOSE,3);
VAR1:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;
VAR2:=SMA(VAR1,9,1)+100;
VAR3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR4:=SMA(VAR3,3,1);
VAR5:=SMA(VAR4,3,1)+100;
VAR6:=VAR5-VAR2;
动能:=IF(VAR6>45,VAR6-45,0);
MA15:=EMA(CLOSE,21);
建仓1:=((CROSS(FF,MA15) AND CROSS(C,分水岭) AND CROSS(C,逃顶线) AND
CROSS(C,乾坤线) AND O>支撑) OR (CROSS(FF,MA15) AND 涨幅) OR
(CROSS(FF,MA15) AND (CROSS(H,乾坤线) OR CROSS(H,逃顶线) OR CROSS(H,分水岭) AND 涨幅))) AND 强势
,COLORYELLOW;
主力建仓:IF(建仓1>0,建仓1,0),COLORYELLOW,NODRAW;
STICKLINE(建仓1>0,0,建仓1*0.375,3,0),COLORYELLOW;
DRAWTEXT(建仓1>0,建仓1*0.375,'主力建仓'),COLORYELLOW;
AA:=IF(NAMELIKE('ST'),0,1) AND IF(NAMELIKE('*ST'),0,1);
GH1:=Abs(((3.48*CLOSE+HIGH+LOW)/4-EMA(CLOSE,20))/EMA(CLOSE,20));
GH2:=DMA(((2.11*CLOSE+LOW+HIGH)/4),GH1);
GHH:=EMA(GH2,200)*1.118;
GH3:=(MA(C,3));
GH4:=(MA(C,5));
GH5:=(MA(C,8));
GH6:=(MA(C,13));
GH7:=(((((MA(C,3)) > (REF(MA(C,3),1))) AND ((MA(C,5)) > (REF(MA(C,5),1)))) AND (C > (MA(C,3)))) AND ((MA(C,3)) > (MA(C,5))));
GH8:=(((ATAN(((GH3 / (REF(GH3,1))) - 1) * 100)) * 180) / (3.1416));
GH9:=(((ATAN(((GH4 / (REF(GH4,1))) - 1) * 100)) * 180) / (3.1416));
GH10:=(((ATAN(((GH5 / (REF(GH5,1))) - 1) * 100)) * 180) / (3.1416));
GH11:=(((ATAN(((GH6 / (REF(GH6,1))) - 1) * 100)) * 180) / (3.1416));
GH12:=IF(GH7 AND GH8>45 AND GH9>45 AND GH10>60 AND GH11>45 AND MA(C,250)>REF(MA(C,250),1),1,0);
乘胜追击:GH12 AND SUM(GH12,2)=1 AND C/GHH>1.03 AND C/GHH<1.2,NODRAW;
STICKLINE(乘胜追击,0,乘胜追击*0.125,3,0), COLORGREEN;
STICKLINE(乘胜追击,乘胜追击*0.25,乘胜追击*0.125,2,0),COLORYELLOW;
STICKLINE(乘胜追击,乘胜追击*0.25,乘胜追击*0.375,1,0), COLORMAGENTA;

通达信周引用MACD指标公式

相关文章