公式网 股票指标公式源码分享 登录 注册
公式指标平网
未来函数检测
首页 金钻指标 通达信公式 大智慧公式 同花顺公式 文华财经公式 东财通公式 飞狐公式 操盘手公式 其他公式 公式解答 股票软件 股票池
当前位置:→ 公式网 > 通达信公式 > 正文 → 正文

通达信主趋势MACD副图源码

发布时间:2024/3/28 16:05:45  浏览次数:

DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORGREEN;
DEA:EMA(DIF,9),COLORBLUE;
MACD:(DIF-DEA)*2,COLORSTICK;
IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2;
IF(DEA>REF(DEA,1),DEA,DRAWNULL),COLORRED,LINETHICK2;
STICKLINE(((MACD<REF(MACD,1)) AND (MACD>0)),0,MACD,0.05,0),COLORLIBLUE,LINETHICK2;
STICKLINE(((MACD>REF(MACD,1)) AND (MACD<0)),0,MACD,0.05,0),COLORFF00FF,LINETHICK2;

 
NH:=REF(DIF,3)>=REF(DIF,2) AND REF(DIF,2)>=REF(DIF,1) AND DIF>REF(DIF,1)*1.1;
NH1:=ABS((REF(DIF,1)-REF(DEA,1))/REF(DIF,1))<=0.2;
DT:=REF(DIF,2)>REF(DEA,2) AND REF(DIF,1)>=REF(DEA,1) AND DIF>DEA;
NLZ:=MACD>REF(MACD,1) AND DIF>0;
NLZ1:=MACD>REF(MACD,1) AND DIF<0;
将死不死1:=(NH1 AND NH AND DT AND NLZ);
将死不死0:=(NH1 AND NH AND DT AND NLZ1);
将死不死:将死不死1 OR 将死不死0,NODRAW;
DRAWICON(将死不死,DEA-0.01,38);
DRAWICON(将死不死,DEA-0.03,38);
DRAWICON(CROSS(DIF,DEA),DEA,9);
DRAWICON(CROSS(DEA,DIF),DIF,15);
AB1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,AB1+1)>CLOSE AND DIF>REF(DIF,AB1+1) AND CROSS(DIF,DEA);
DRAWLINE(AB1=0,DEA,底背离,DEA,0),COLORYELLOW,LINETHICK1;
AB2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,AB2+1)<CLOSE AND REF(DEA,AB2+1)>DEA AND CROSS(DEA,DIF);
DRAWLINE(AB2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK1;
DRAWTEXT(底背离>0,DEA,'底背离'),COLORYELLOW;
DRAWTEXT(顶背离>0,DEA,'顶背离'),COLORGREEN;
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:=12;LONG:=26;MID:=9;
STICKLINE(OBV3>REF(OBV3,1) AND MAC3>REF(MAC3,1),0,MACD,2,0),COLORYELLOW;
{持币:STICKLINE((SAR(10,2,20)>=H),MACD,0,1.5,0),COLORGREEN;
持股:STICKLINE((SAR(10,2,20)<=L),0,MACD,1.5,0),COLORYELLOW;}

 
ZSC:=CROSS(DEA#WEEK,DIF#WEEK);
ZSC1:=CROSS(DEA,DIF);
PC:=IF(EXISTR(ZSC,7,1),0,1);
PC1:=IF(EXISTR(ZSC1,7,1),0,1);
Q1:=MACD<0 AND MACD>REF(MACD ,1) AND
REF(MACD ,1)<REF(MACD ,2) AND REF(MACD ,2)<REF(MACD ,3)
AND REF(MACD ,3)<REF(MACD ,4);
SCL:=EXISTR(CROSS(DEA,DIF),9,1);
C1:=BARSLAST(REF(Q1,1));
C2:=REF(MACD,C1+1)<MACD AND Q1 AND DIF<0 ;
TJ:=MACD>0;T:=MACD<0;
A:=LLV(MACD,50)=MACD;
DRAWICON(A AND FILTERX(A,20), MACD,1);
DRAWTEXT(BARSLAST(TJ)=1,MACD,'1'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=2,MACD,'2'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=3,MACD,'3'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=5,MACD,'5'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=8,MACD,'8'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=13,MACD,'13'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=21,MACD,'21'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=34,MACD,'34'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=55,MACD,'55'),COLORYELLOW;
DRAWTEXT(BARSLAST(T)=1,MACD,'1'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=2,MACD,'2'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=3,MACD,'3'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=5,MACD,'5'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=8,MACD,'8'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=13,MACD,'13'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=21,MACD,'21'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=34,MACD,'34'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=55,MACD,'55'),COLORGREEN;

 
X_1:=(CLOSE-EMA(CLOSE,5))/EMA(CLOSE,5)*100;
X_2:=(CLOSE-EMA(CLOSE,10))/EMA(CLOSE,10)*100;
X_3:=(CLOSE-EMA(CLOSE,20))/EMA(CLOSE,20)*100;
X_4:=(CLOSE-EMA(CLOSE,60))/EMA(CLOSE,60)*100;
X_5:=(CLOSE-EMA(CLOSE,120))/EMA(CLOSE,120)*100;
X_6:=X_1>1 AND X_2>2 AND X_3>3 AND X_4>4;
X_7:=X_1>2 AND X_2>4 AND X_3>6 AND X_4>8;
X_8:=X_1>3 AND X_2>5 AND X_3>7 AND X_4>9;
X_9:=X_1>4 AND X_2>6 AND X_3>8 AND X_4>10 AND X_5>12;
X_10:=BARSLASTCOUNT(X_7)=1 AND CROSS(CLOSE,EMA(CLOSE,50)*1.19) AND HIGH/CLOSE<1.05;{指标众筹QQ 115534139}
小鱼:BARSLASTCOUNT(X_6),NODRAW,COLORWHITE;
红鱼:BARSLASTCOUNT(X_7),NODRAW,COLORRED;
紫鱼:BARSLASTCOUNT(X_8),NODRAW,COLORMAGENTA;
黄鱼:BARSLASTCOUNT(X_9),NODRAW,COLORYELLOW;
通达信主趋势MACD副图源码
 
通达信主趋势MACD副图源码
资源下载链接   资源大小:unknow

手机移动版 - 关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - TOP
湘ICP备09016573号-3 增值电信业务经营ICP许可证:湘B2-20210269 湘公网安备43108102000039号
Copyright © GSZX.COM.CN ,All Rights Reserved.
股票公式,股票指标,股票软件,股票知识