• 欢迎访问第一股票指标公式网,汇集目前最全,最新的各种股票公式,股票指标公式,公式下载等股票软件指标公式源码

把另类MACD改成大智慧软件

常见公式 第一股票指标公式网 1个月前 (11-01) 7次浏览 已收录 0个评论 扫描二维码

股友提问要求:

171415.com解答:

 网友求助:

源码:F:=EMA(C,5)-EMA(C,21);
A:=EMA(F,8);
MD:=(F-A)*2,COLORSTICK;
STICKLINE(MD>=0 AND MD<REF(MD,1),0,MD,2,1),COLORGREEN;
下跌趋势:IF(MD>=0 AND MD<REF(MD,1),MD,0),COLORGREEN,NODRAW;

STICKLINE(MD<0 AND MD<REF(MD,1),0,MD,2,1),COLORGRAY;
坚壁清野:IF(MD<0 AND MD<REF(MD,1),MD,0),COLORGRAY,NODRAW;

STICKLINE(MD<=0 AND MD>REF(MD,1),0,MD,2,1),COLORMAGENTA;
反弹需谨慎:IF(MD<=0 AND MD>REF(MD,1),MD,0),COLORMAGENTA,NODRAW;

STICKLINE(MD>=0 AND MD>REF(MD,1),0,MD,2,1),COLORRED;
上升趋势:IF(MD>=0 AND MD>REF(MD,1),MD,0),COLORRED,NODRAW;

SS:=COUNT(REF(MD,1)>REF(MD,2),2)>=2 AND REF(MD,1)>=0;
JS:=MD<REF(MD,1);
XG:=SS AND JS;
STICKLINE(XG,MD,0,2,0),COLORFF7700;
STICKLINE(XG,MD,0,1.5,0),COLORFFAA22;
STICKLINE(XG,MD,0,0.75,0),COLORFFFF55;
溪云初起日沉阁:IF(XG,MD,0),COLORCYAN,NODRAW;

TJ1:=COUNT(REF(MD,1)<REF(MD,2),2)>=2 AND REF(MD,1)>=0 AND REF(F,1)>=0 AND MD>REF(MD,1) AND F>REF(F,1);
TJ2:=COUNT(REF(MD,1)<REF(MD,2),2)>=2 AND REF(MD,1)<=0 AND REF(F,1)>=0 AND MD>0 AND F>REF(F,1);
TJ3:=COUNT(REF(MD,1)<REF(MD,2),2)>=2 AND REF(MD,1)<=0 AND REF(F,1)<=0 AND MD>REF(MD,1) AND F>0;
TJ4:=COUNT(REF(MD,1)<REF(MD,2),2)>=2 AND REF(MD,1)>=0 AND REF(F,1)<=0 AND MD>REF(MD,1) AND F>REF(F,1);
TJ5:=COUNT(REF(MD,1)<REF(MD,2),2)>=2 AND REF(MD,1)<=0 AND REF(F,1)<=0 AND MD>0 AND F>REF(F,1);

STICKLINE(TJ5,MD,0,2,0),COLORAA00BB;
STICKLINE(TJ5,MD,0,1.5,0),COLORCC22BB;
STICKLINE(TJ5,MD,0,0.5,0),COLOREE44BB;

STICKLINE(TJ4,MD,0,2,0),COLOR131FFD;
STICKLINE(TJ4,MD,0,1.5,0),COLOR5050FF;
STICKLINE(TJ4,MD,0,0.5,0),COLOR7E7EFF;

STICKLINE(TJ3,MD,0,2,0),COLORAA00BB;
STICKLINE(TJ3,MD,0,1.5,0),COLORCC22BB;
STICKLINE(TJ3,MD,0,0.5,0),COLOREE44BB;

STICKLINE(TJ2,MD,0,2,0),COLORAA00BB;
STICKLINE(TJ2,MD,0,1.5,0),COLORCC22BB;
STICKLINE(TJ2,MD,0,0.5,0),COLOREE44BB;

STICKLINE(TJ1,MD,0,2,0),COLOR0000AA;
STICKLINE(TJ1,MD,0,1.5,0),COLOR0022CC;
STICKLINE(TJ1,MD,0,0.5,0),COLOR0055FF;

草满花堤水满溪:IF(TJ1 OR TJ2 OR TJ3 OR TJ4 OR TJ5 ,MD,0),COLORYELLOW,NODRAW;

均线差:F,COLORWHITE;
EMA8:A,COLORYELLOW;

多:IF((均线差>0),均线差,DRAWNULL),COLORRED;
空:IF((均线差<0),均线差,DRAWNULL),COLORGREEN;


解答如下:
F:=EMA(C,5)-EMA(C,21);
A:=EMA(F,8);
MD:(F-A)*2,COLORSTICK;
STICKLINE(MD>=0 AND MD<REF(MD,1),0,MD,8,1),COLORGREEN;
下跌趋势:IF(MD>=0 AND MD<REF(MD,1),MD,0),COLORGREEN,LINETHICK0;
STICKLINE(MD<0 AND MD<REF(MD,1),0,MD,8,1),COLORGRAY;
坚壁清野:IF(MD<0 AND MD<REF(MD,1),MD,0),COLORGRAY,LINETHICK0;
STICKLINE(MD<=0 AND MD>REF(MD,1),0,MD,8,1),COLORMAGENTA;
反弹需谨慎:IF(MD<=0 AND MD>REF(MD,1),MD,0),COLORMAGENTA,LINETHICK0;
STICKLINE(MD>=0 AND MD>REF(MD,1),0,MD,8,1),COLORRED;
上升趋势:IF(MD>=0 AND MD>REF(MD,1),MD,0),COLORRED,LINETHICK0;
SS:=COUNT(REF(MD,1)>REF(MD,2),2)>=2 AND REF(MD,1)>=0;
JS:=MD<REF(MD,1);
XG:=SS AND JS;
STICKLINE(XG,MD,0,8,0),COLORFF7700;
STICKLINE(XG,MD,0,5,0),COLORFFAA22;
STICKLINE(XG,MD,0,1,0),COLORFFFF55;
溪云初起日沉阁:IF(XG,MD,0),COLORCYAN,LINETHICK0;
TJ1:=COUNT(REF(MD,1)<REF(MD,2),2)>=2 AND REF(MD,1)>=0 AND REF(F,1)>=0 AND MD>REF(MD,1) AND F>REF(F,1);
TJ2:=COUNT(REF(MD,1)<REF(MD,2),2)>=2 AND REF(MD,1)<=0 AND REF(F,1)>=0 AND MD>0 AND F>REF(F,1);
TJ3:=COUNT(REF(MD,1)<REF(MD,2),2)>=2 AND REF(MD,1)<=0 AND REF(F,1)<=0 AND MD>REF(MD,1) AND F>0;
TJ4:=COUNT(REF(MD,1)<REF(MD,2),2)>=2 AND REF(MD,1)>=0 AND REF(F,1)<=0 AND MD>REF(MD,1) AND F>REF(F,1);
TJ5:=COUNT(REF(MD,1)<REF(MD,2),2)>=2 AND REF(MD,1)<=0 AND REF(F,1)<=0 AND MD>0 AND F>REF(F,1);
STICKLINE(TJ5,MD,0,8,0),COLORAA00BB;
STICKLINE(TJ5,MD,0,5,0),COLORCC22BB;
STICKLINE(TJ5,MD,0,0.5,0),COLOREE44BB;
STICKLINE(TJ4,MD,0,8,0),COLOR131FFD;
STICKLINE(TJ4,MD,0,5,0),COLOR5050FF;
STICKLINE(TJ4,MD,0,0.5,0),COLOR7E7EFF;
STICKLINE(TJ3,MD,0,8,0),COLORAA00BB;
STICKLINE(TJ3,MD,0,5,0),COLORCC22BB;
STICKLINE(TJ3,MD,0,0.5,0),COLOREE44BB;
STICKLINE(TJ2,MD,0,8,0),COLORAA00BB;
STICKLINE(TJ2,MD,0,5,0),COLORCC22BB;
STICKLINE(TJ2,MD,0,0.5,0),COLOREE44BB;
STICKLINE(TJ1,MD,0,8,0),COLOR0000AA;
STICKLINE(TJ1,MD,0,5,0),COLOR0022CC;
STICKLINE(TJ1,MD,0,0.5,0),COLOR0055FF;
草满花堤水满溪:IF(TJ1 OR TJ2 OR TJ3 OR TJ4 OR TJ5 ,MD,0),COLORYELLOW,LINETHICK0;
均线差:F,COLORWHITE;
EMA8:A,COLORYELLOW;
{多:}PARTLINE(均线差,(均线差>0),RGB(250,0,0));
{空:}PARTLINE(均线差,(均线差<0),RGB(0,250,0));

 


第一股票指标公式网所有股票公式及文章来源于网络仅供学习研究,请勿以此为依据进行股票交易。 版权投诉邮箱:313707241@qq.com 投放广告公式交流 QQ:313707241
喜欢 (0)
[]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址