把价macd改为通达信
更多金钻指标股票技术讨论QQ群:966329692 技术讨论QQ群:220302856 技术讨论QQ群:39652085 如群满可换一个

编写要求:

OBV:=EMA(SUM(IF(C>REF(C,1),VOL,IF(C=REF(DIFF,1) AND DEA>=REF(DEA,1)),LINETHICK4,Color0089FF;{//橙}FILLRGN(DIFF,DEA,DIFF>=DEA),Color0089FF;{//橙--加宽}PARTLINE(DIFF,DIFF<=REF(DIFF,1) AND DEA<=REF(DEA,1)),LINETHICK4,COLORBLUE;{//蓝21}FILLRGN(DIFF,DEA,DIFF<=DEA),COLORBLUE;{//蓝--加宽}PARTLINE(DIFF,DIFF>=REF(DIFF,1) AND DEA<=REF(DEA,1)),LINETHICK4,Color00C500;{//绿}PARTLINE(DIFF,DIFF<=REF(DIFF,1) AND DEA>=REF(DEA,1)),LINETHICK4,COLORYELLOW;{//黄}STICKLINE(MACD>ref(MACD,1) and MACD>0,0,MACD,2,0),COLORRED; STICKLINE(MACD0,0,MACD,2,0),COLORYELLOW;STICKLINE(MACDref(MACD,1) and MACD<0,0,MACD,2,0),COLOR0099FF; PARTLINE(2*(DEA-DIFF),C),LINETHICK2,COLORGRAY;{//加速线}

解答:

 OBV:=EMA(SUM(IF(C>REF(C,1),VOL,IF(C<REF(C,1),-V,0)),0)/1000,2);

OBVE:=EMA(OBV,3);
DIFF:EMA(OBVE,12)-EMA(OBVE,26),LINETHICK4,COLORFF0000;
BBDIFF:=DIFF-REF(DIFF,1);
DEA:=EMA(DIFF,9);
BBDEA:=DEA-REF(DEA,1);
MACD:=2*(DIFF-DEA);
0,colorwhite;
IF(DIFF>=REF(DIFF,1) AND DEA>=REF(DEA,1),DIFF,DRAWNULL),LINETHICK4,COLOR0089FF;{//橙}
DRAWBAND(DIFF,RGB(255,90,0),DEA,RGB(0,0,255));
IF(DIFF>=REF(DIFF,1) AND DEA<=REF(DEA,1),DIFF,DRAWNULL),LINETHICK4,COLOR00C500;{//绿}
IF(DIFF<=REF(DIFF,1) AND DEA>=REF(DEA,1),DIFF,DRAWNULL),LINETHICK4,coloryellow;{//黄}
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,0.5,0),colorred; 
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,0.5,0),coloryellow;
STICKLINE(MACD<REF(MACD,1) AND MACD<0,0,MACD,0.5,0),colorcyan;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,0.5,0),COLOR0099FF; 
加速线:2*(DEA-DIFF),LINETHICK2,colorgray;
 

选股票看什么指标最好 >股票指标网