正点财经首页     加入收藏
指标首页 通达信指标 同花顺指标 大智慧指标 飞狐指标 指标教程 指标实战 指标百科 股市学院
指标源码搜索: 热词:买卖  黑马  K线  牛股  量能  波段  顶底  抄底  成本  逃顶  MACD  涨停  换手率
你的位置: > 正点财经 > 炒股指标公式 > 同花顺指标公式 > 正文

同花顺量价MACD指标公式

同花顺指标公式源码概况:
  • 指标类别: 同花顺指标公式
  • 授权方式: 免费版
  • 指标评级: ★★★★★
  • 指标分类: 趋势
  • 画线方法: 副图
  • 日期:2023-01-11 来源:互联网
同花顺指标公式源码介绍:

同花顺量价MACD指标公式:

AA:=SMA((CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*10,3,1);
DIFf:=(EMA(CLOSE,9)-EMA(CLOSE,21))*2;
趋势:EMA(DIFF,9),coloryellow,LINETHICK1;
FILLRGN(DIFF,趋势,DIFF>趋势,(RGB(200,100,100)));
MACD:=(DIFF-趋势)*2;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,8,0 ),COLOR333300;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,7,0 ),COLOR444400;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,6,0 ),COLOR555500;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,5,0 ),COLOR777700;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,4,0 ),COLOR999900;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,3,0 ),COLORBBBB00;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLORDDDD00;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1,0 ),COLORFFFF00;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,8 ,0 ),COLOR000033;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,7 ,0 ),COLOR000044;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,6 ,0 ),COLOR000055;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,5 ,0 ),COLOR000077;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,4 ,0 ),COLOR000099;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,3 ,0 ),COLOR0000BB;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2 ,0 ),COLOR0000DD;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1 ,0 ),COLOR0000FF;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,8,0 ),COLOR330033;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,7,0 ),COLOR440044;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,6,0 ),COLOR550055;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,5,0 ),COLOR770077;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,4,0 ),COLOR990099;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,3,0 ),COLORBB00BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORDD00DD;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1,0 ),COLORFF00FF;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,8,0 ),COLOR003300;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,7,0 ),COLOR004400;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,6,0 ),COLOR005500;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,5,0 ),COLOR007700;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,4,0 ),COLOR009900;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,3,0 ),COLOR00BB00;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLOR00DD00;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1,0 ),COLOR00FF00;
BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主买:=IF(CLOSE>OPEN,BB*(HIGH-LOW),IF(CLOSE<OPEN,BB*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主卖:=IF(CLOSE>OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-BB*(HIGH-LOW),0-VOL/2));
ZJ:=(主买+主卖);
YX:=BARSSINCE(ZJ)+1;
QM:=BARSLAST(ZJ<=0);
主买:=IF(QM<0,YX,QM);
QM:=BARSLAST(ZJ>=0);
主卖:=IF(QM<0,YX,QM);
动力:=(主买-主卖);
强买:=(EMA(主买,12)-EMA(主买,26));
强卖:=(EMA(主卖,12)-EMA(主卖,26));
买方能量:=EMA(强买,9);
卖方能量:=EMA(强卖,9);
能量:=(买方能量-卖方能量);
量价线:((EMA(CLOSE,9)-EMA(CLOSE,21))*2+AA+能量/2)/2;
PARTLINE(量价线,量价线>=REF(量价线,1),RGB(255,0,0),量价线<REF(量价线,1),RGB(0,0,255)),LINETHICK2;
零轴:0,colorgray;
gj:=MAX(C,O);
L4:=LLV(gj,4);
jl:=(HHV(diff,55)-LLV(diff,55))/5;
gt:=趋势>REF(趋势,1) AND REF(趋势,1)<REF(趋势,2);
A1:=BARSLAST(REF(gt,1));
底背离:=REF(L4,A1+1)>CLOSE AND diff>REF(diff,A1+1) AND gt;
DRAWLINE(A1=0,趋势,底背离,REF(趋势,A1),0),colorred,LINETHICK2;
DRAWLINE(底背离,趋势,底背离,REF(趋势,A1),0),colorred,LINETHICK2;
DRAWTEXT(底背离,REF(趋势,A1),' 底背离'),COLORFF00FF;
H4:=HHV(gj,4);
gt2:=趋势<REF(趋势,1) AND REF(趋势,1)>REF(趋势,2);
A2:=BARSLAST(REF(gt2,1));
顶背离:= REF(H4,A2+1)<H4 AND diff<REF(diff,A2+1) AND gt2;
DRAWLINE(A2=0 ,趋势,顶背离,REF(趋势,A2),0),colorgreen,LINETHICK2;
DRAWLINE(顶背离,趋势,顶背离,REF(趋势,A2),0),colorgreen,LINETHICK2;
DRAWTEXT(顶背离,REF(趋势,A2),' 顶背离'),colorgreen;
DRAWICON(CROSS(DIFF,趋势),趋势,"BUY");

同花顺量价MACD指标公式实例图解:

同花顺量价MACD指标公式

同花顺量价MACD指标公式

  • 风云榜
  • 总点击榜
  • 最新指标
月点击榜指标公式
更多指标百科
关于我们 | 商务合作 | 联系投稿 | 联系删稿 | 合作伙伴 | 法律声明 | 网站地图