编写要求:
解答:
?网友求助:
请老师帮忙把 macd背离和MACD优化 2个公式组合
要求:把macd优化中大红色部分添加到macd背离公式中
macd优化 源码:
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26),LAYER0;
DEA : EMA(DIFF,9),LAYER0;
MACD : 2*(DIFF-DEA),COLORSTICK,LAYER0;
主升 : DIFF>0 AND DIFF>DEA,COLOR0000FF,POINTDOT,LINETHICK0;
FILLRGN(DIFF,DEA,主升,RGB(250,0,0));
macd背离 源码:
DIF : EMA(CLOSE,12) - EMA(CLOSE,26); DEA : EMA(DIF,9);
MACD : 2*(DIF-DEA), COLORSTICK;
QZQ:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
QM:=LLVBARS(MACD,QZQ+20);
MQDZ:=IF(QM>QZQ,REF(MACD,QM),0);
QF:=LLVBARS(DIF,QZQ+20);
DQDZ:=IF(QF>QZQ,REF(DIF,QF),0);
XG1:=MACD<0 AND MACD>MQDZ AND DIF<0 AND DIF>DQDZ AND CLOSE=LLV(CLOSE,QZQ+20) AND MQDZ<0 AND DQDZ<0;
DRAWICON(REF(XG1,1)=1 AND MACD>REF(MACD,1),DIF,1);
轴:0,COLORWHITE;
DRAWTEXT(REF(MACD,1)>0 AND MACD<0,MACD-0.01,'1');
DRAWTEXT(REF(MACD,2)>0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'2');
DRAWTEXT(REF(MACD,3)>0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'3');
DRAWTEXT(REF(MACD,4)>0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'4');
DRAWTEXT(REF(MACD,5)>0 AND REF(MACD,4)<0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'5');
DRAWTEXT(REF(MACD,6)>0 AND REF(MACD,5)<0 AND REF(MACD,4)<0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'6');
先谢啦
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!