N:=1.5;
M:=3;
P:=64;
DIFF:=EMA((EMA(CLOSE,N*12)-EMA(CLOSE,N*26))/EMA(CLOSE,N*26)*1000,M);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
MACDX:=MACD;
MACD=EMA(MACD,5),COLORFF77FF;
DIFFO:=EMA(DEA,P)*1.8;
B:=MACD-REF(MACD,1);
MACD>0 AND B>0;
发现机构入场:DIFF>=REF(DIFF,1) AND DEA<REF(DEA,1),COLORWHITE;
短线出局:DIFF<REF(DIFF,1) AND DEA>REF(DEA,1),COLORGREEN;
STICKLINE(MACD>0 AND B<0,0,MACD,0,0),COLOR0000CD;

STICKLINE(MACD<0 AND B>0,0,MACD,0,1),COLORCYAN;
STICKLINE(MACD<0 AND B<0,0,MACD,0,0),COLORCYAN;
STICKLINE(DIFF>DEA,DIFF,DEA,12,0),COLOR0089FF;
STICKLINE(DIFF<DEA,DIFF,DEA,12,0),COLORBLUE;
PARTLINE(DIFF,DIFF>=REF(DIFF,1) AND DEA<REF(DEA,1),RGB(250,255,250)),LINETHICK5;
PARTLINE(DIFF,DIFF<REF(DIFF,1) AND DEA>REF(DEA,1),RGB(0,255,0)),LINETHICK5;
PARTLINE(DIFF,DIFF>=REF(DIFF,1) AND DEA>REF(DEA,1),RGB(169,169,169));
PARTLINE(DIFF,DIFF<REF(DIFF,1) AND DEA<REF(DEA,1),RGB(255,0,215));
PARTLINE(DIFFO,DIFFO>=ref(DIFFO,1),RGB(255,0,0));
PARTLINE(DIFFO,DIFFO=ref(DIFFO,1),RGB(0,255,0));
PARTLINE(DIFFO,DIFFO<ref(DIFFO,1),RGB(0,255,250));
DRAWTEXTABS(3 ,5 ,’操作:蓝转白试买;见橙加仓;维持橙持股,’ ),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(3 ,28 ,’橙转绿减仓;蓝色空仓,’ ),COLOR00FFFF,LINETHICK2;
ma1:=ma(c,4);
ma2:=ma(c,10);
ma3:=ma(c,17);
aa:=ma1>ma2 and ma3>ref(ma3,1);
可入:=cross(DIFF,DEA)and aa;
DRAWTEXT(FILTER(可入,20),25,’可入’),COLORCYAN ;
STICKLINE(FILTER(可入=1,20) ,50,0,15,0),colorf00ff0;
 


声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。