编写要求:
解答:
?网友求助:
DIF:=EMA(CLOSE,3)-EMA(CLOSE,13); 主升:= DIF>0 AND DIF>DEA; A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
DEA:=EMA(DIF,5);
MACD:2*(DIF-DEA),COLORSTICK;
STICKLINE(MACD>0,MACD, 0, 0, 1),color0055cc;
STICKLINE(MACD<0,MACD, 0, 0, 1),Colordddd00;
STICKLINE(MACD0,0,MACD,0.1,0),COLORYELLOW;
DRAWICON(BARSTATUS=2 AND MACD>REF(MACD,1),HHV(MACD,35), 7),VALIGN2;
DRAWICON(BARSTATUS=2 AND MACD
PARTLINE(DIF,DIF>ref(DIF,1),RGB(255,50,0),DIF
PARTLINE(MACD,MACD>0,RGB(205,100,100),MACD<0,RGB(0,200,0)),COLORSTICK;
VAR1:=HHV(DEA,60);
VAR2:=LLV(DEA,100);
VAR3:=DEA-(DIF-DEA);
FILLRGN(DIF,DEA,DIF>DEA,RGB(130,0,0),DIF
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
STICKLINE(底背离,0,0.13,6,0),Colorred;
DRAWTEXT(底背离,dea,' 底背离'),Colorred;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)
DRAWTEXT(顶背离,dea,' 顶背离'),Colorgreen;
a1:=DIF<0 and DEA<0;
a2:=a1>REF(a1,1);
a3:=BARSLAST(a2);
a4:=COUNT(DEA>0 and DIF>0,a3)=0;
a5:=CROSS(DIF,DEA);{金叉}
a6:=BARSLAST(a5);
a7:=REF(a6,a6+1)+a6;
a8:=(DiF+DEA)/2;
a9:=(HIGH+LOW)/2;
a10:=a5 and a7REF(a8,a7) and a90;
DRAWTEXT(a10,dif*0.95,'★'),COLORyellow;
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!