编写要求:
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:2*(DIFF-DEA), COLORSTICK;
MACD1:SMA(MACD,3,1);
MACD2:SMA(MACD1,3,1);
中线:=EMA(SLOPE(C,21)*20+C,55);
短线:=MA(CLOSE-中线,5)+中线;
副线:=SMA(短线,3,1);
UPR:=中线+3*STD(中线,10);
DWN:=中线-3*STD(中线,10);
上:HHV(MACD,20),COLORGRAY,DOTLINE;
金叉:CROSS(副线,中线) AND 短线>=副线 AND BARSLAST(MACD=上)<=10,PRECIS0,LINETHICK0;
drawbmp(金叉,0,'buy1.bmp'),align1,valign2;
准备区:last(中线>REF(中线,1) AND 副线>REF(副线,1) AND BARSLAST(金叉)<=10),COLOR00FFFF,PRECIS0,LINETHICK0;
窄:=(UPR-DWN)/DWN*100;
拐头:UPR>=REF(UPR,1) AND REF(UPR,1)=UPR AND 短线>=REF(短线,1) AND BARSLAST(窄=LLV(窄,30))<=5 AND BARSLAST(MACD=上)<=10,COLORYELLOW,PRECIS0,LINETHICK0;
STICKLINE(拐头,MACD,0,8,1),COLORYELLOW,LINETHICK1;
操作区:last(短线>=UPR AND 中线>REF(中线,1) AND BARSLAST(拐头)<10),COLORRED,PRECIS0,LINETHICK0;
阴:=(LOW<=副线 AND CLOSE<短线) OR (CLOSE副线 AND REF(短线,1)<=REF(副线+0.01,1)) AND 短线>=中线 AND 中线>=REF(中线,1) AND MACD>=0 AND MACD1>=MACD2,PRECIS0,COLORWHITE,LINETHICK0;
STICKLINE(交叉,MACD1,MACD2,3,0),COLORWHITE,LINETHICK1;
下:LLV(MACD,20),COLORCYAN,PRECIS2,DOTLINE;
PARTLINE(上,MACD=上,RGB(255,255,255));
PARTLINE(MACD1,操作区,RGB(255,0,0)),LINETHICK2;
PARTLINE(MACD1,准备区,RGB(255,255,255)),LINETHICK2;
FILLRGN(0,MACD2,0>MACD2 AND 0
解答:
?DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!