『壹』 1、帮助写个通达信macd 的指标,与通达信自带macd一样。
1、简单的,和系统macd一样的如下:
DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORBLUE;
DEA:EMA(DIF,9),COLORGREEN;
MACD:(DIF-DEA)*2,COLORSTICK;
红柱:IF(MACD>REF(MACD,1),MACD,DRAWNULL),STICK,COLORRED;
绿柱:IF(MACD<REF(MACD,1),MACD,DRAWNULL),STICK,COLORGREEN;
2、 和系统macd参数一样的,加了其他条件的如下:
DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORBLUE;
DEA:EMA(DIF,9),COLORGREEN;
MACD:(DIF-DEA)*2,COLORSTICK;
红柱:IF(MACD>REF(MACD,1),MACD,DRAWNULL),STICK,COLORRED;
绿柱:IF(MACD<REF(MACD,1),MACD,DRAWNULL),STICK,COLORGREEN;
抄底:ABS((CROSS(DIF,DEA)&&DEA<=-0.07)*DIF)*1.50,COLORLIMAGENTA;
强度1:IF(DIF>DEA,DIF,DRAWNULL),COLORRED,LINETHICK1;
强度2:IF(DEA<DIF,DEA,DRAWNULL),COLORMAGENTA,LINETHICK1;
DRAWTEXT(ABS(抄底)>0,抄底*1.10,'抄底'),COLORYELLOW;
DRAWICON(ABS(抄底)>0,抄底*1.02,4);
DRAWICON(CROSS(DIF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIF) ,DEA,2);
DRAWICON(CROSS(DIF,0) AND DIF>DEA,0,1);
DRAWICON(CROSS(0,DIF) AND DIF<DEA,0,2);
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
底背离:=REF(C,A1+1)>C AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
顶背离:=REF(C,A2+1)<C AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
DRAWTEXT(底背离=1 AND A2<=10,DIF,'底背'),COLORRED;
DRAWTEXT(顶背离=1 AND A1<=10,DIF,'顶背'),COLORGREEN;
XG:底背离=1 AND A2<=10,NODRAW;
『贰』 自动寻找底部龙抬头指标公式
公式如下:
红柱 :if(macd.macdref(macd.macd, 1),macd.macd,drawnull),stick,colorred; k t: :if(macd.macdref(macd.macd, 1),macd.macd,drawnull),stick,coloryellow;
抄底:abs((cross(macd.dif,macd.dea)
macd.dea=-0.07)*macd.dif)*1.50,colorlimagenta;dif:macd.dif,colorwhite;
dea:macd.dea,coloryellow;
强度 1:if(difdea,dif,drawnull),colorred,linethick2;
强度 2:if(deadif,dea,drawnull),colormagenta,linethick2;drawtext(abs(抄底 )0,抄底*1.20,抄底),coloryellow;drawicon(abs(抄底 )0,抄底*1.10,4);
drawicon(cross(dif,dea),dea,1);
drawicon(cross(dea,dif),dea,2);
var8:=vol2*ma(vol,30);
var9:=dmi. adx(10,6);
vara:=dmi.adxr(10,6);
varb:=closema(close,30) and closema(close,30)*1 .04;
varc:=ma(close,30)ref(ma(close,30),1);
vard:=barslast(cross(ma(close,5),ma(close, 10))barslast(cross(ma(close, 10),ma(close,5));
varf:=troughbars(3,15,1)4;
var10:=ema(close,30)ref(ema(close,30),2);var11:=if(varf=1 ,50,0);
多空 :ema((close-ma((2*close+high+low)/4,30))/ma((2*close+high+low)/4,30)*100,3),colorwhite;
O,colorred;
stickline(filter(varf=1 ,5) and
多空 -10,50,0,1 5,0),colorf00ffO;
stickline(filter(varf=1 ,5),50,0,6,0),coloryellow;
drawtext(filter(varf=1,3),25, .
大量买入),colorred ;
stickline( 33 -10,0, 3' ,0.85,0),coloryellow;stickline( g Z 10,0, 3Z ,0.95,0),colorred;
『叁』 求写一个macd的选股公式
DIFF:= EMA(CLOSE,10) - EMA(CLOSE,30),colorwhite;
DEA: =EMA(DIFF,9),coloryellow;
MACD: =2*(DIFF-DEA), COLORSTICK;a:=(cross(diff*0.98,dea) or cross(diff,dea)) and dea>0.95; b:=vol>ref(vol,1) and ref(vol,1) >ref(vol,2) ;买:A AND B 粘贴后,可用
『肆』 求助:通达信MACD变色公式
_红柱:IF("MACD.MACD">REF("MACD.MACD",1),"MACD.MACD",DRAWNULL),STICK,COLORRED;
绿柱:IF("MACD.MACD"<REF("MACD.MACD",1),"MACD.MACD",DRAWNULL),
STICK,COLORYELLOW;
_抄底:ABS((CROSS("MACD.DIF","MACD.DEA")
&&"MACD.DEA"<=-0.07)*"MACD.DIF")*1.50,COLORLIMAGENTA;
_DIF:"MACD.DIF",COLORWHITE;
_DEA:"MACD.DEA",COLORYELLOW;
__强度:IF(_DIF>_DEA,_DIF,DRAWNULL),COLORRED,LINETHICK2;
_强度:IF(_DEA<_DIF,_DEA,DRAWNULL),COLORMAGENTA,LINETHICK2;
DRAWTEXT(ABS(_抄底)>0,_抄底*1.20,' 抄底'),COLORYELLOW;
DRAWICON(ABS(_抄底)>0,_抄底*1.10,4);
DRAWICON(CROSS(_DIF,_DEA),_DEA,1);
DRAWICON(CROSS(_DEA,_DIF),_DEA,2);