行业MACD,使用了行业指数的MACD指标

[复制链接]
查看55 | 回复0 | 2022-6-27 15:43:00 | 显示全部楼层 |阅读模式

行业MACD,使用了行业指数的MACD指标

N:=5;
行业:=(HY_INDEXC/REF(HY_INDEXC,1)-1)*100;
大盘:=(INDEXC/REF(INDEXC,1)-1)*100;
个股:=(C/REF(C,1)-1)*100;
个股DIF:=EMA(个股-大盘,12*N)-EMA(个股-大盘,26*N);
个股DEA:=EMA(个股DIF,9*N);
个股MACD:=2*(个股DIF-个股DEA);
{分析 家公式网分享}
行业DIF:=EMA(行业-大盘,12*N)-EMA(行业-大盘,26*N);
行业DEA:=EMA(行业DIF,9*N),COLORYELLOW,LINETHICK2;
行业MACD:=2*(行业DIF-行业DEA);
 
STICKLINE(行业MACD>0,0,行业MACD,2,1),COLORLIGRAY;
STICKLINE(行业MACD<0,0,行业MACD,2,1),COLORBLUE;
STICKLINE(个股MACD>0,0,个股MACD,0,1),COLORYELLOW;
STICKLINE(个股MACD<0,0,个股MACD,0,0),COLORMAGENTA;
★个股:EMA(个股DIF,N),COLORGREEN;
★行业:EMA(行业DIF,N),COLOR4080FF,LINETHICK2;
STICKLINE(MA(INDEXC,5)>MA(INDEXC,10),0,0,5,0),COLORRED;
STICKLINE(MA(INDEXC,5)<MA(INDEXC,10),0,MINDIFF,5,0),COLORGREEN;
 
Z5:=STRCAT('今日大盘上涨家数:',CON2STR(INDEXADV,0));
Z6:=STRCAT(' 下跌家数:',CON2STR(INDEXDEC,0));
Z70:=STRCAT(VAR2STR(BLOCKSETNUM(HYBLOCK),0),'家');
Z7:=STRCAT(HYBLOCK,STRCAT('上涨家数:',VAR2STR(HY_INDEXADV,0)));
Z8:=STRCAT(' 下跌家数:',VAR2STR(HY_INDEXDEC,0));
DRAWTEXT_FIX(1,0,0.1,0,STRCAT(Z5,Z6)),COLORWHITE;
DRAWTEXT_FIX(1,0,0.2,0,STRCAT(Z70,STRCAT(Z7,Z8))),COLORYELLOW;
 

2022251258366067.png

2022251258366067.png
 

20222512575491743.rar

2.27 KB, 下载次数: 0

售价: 1 金钱  [记录]  [购买]

20222512575491743.rar

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则