把价macd改为通达信
2020/4/26 19:14:20
公式编写说明:
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);bbDIFF:=DIFF-ref(DIFF,1);DEA:=EMA(DIFF,9);bbDEA:=DEA-ref(DEA,1);MACD:=2*(DIFF-DEA);PARTLINE(0,C),COLORWHITE;PARTLINE(DIFF,DIFF>=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;
投 股票网 www.t ou18.cn
股市公式下载推荐