?在黄色字“金叉5天前最低”出现时写一个选股或预警指标
{主图}
MA5:MA(C,5),DOTLINE;
MA10:MA(C,10),DOTLINE;
死叉:=BARSLAST(CROSS(MA10,MA5));
金叉:=BARSLAST(CROSS(MA5,MA10));
ZG:=FINDHIGHBARS(H,死叉+1,5,1);
ZD:=FINDLOWBARS(L,金叉+1,5,1);
A:REF(H,BARSLAST(CURRBARSCOUNT=CONST(ZG)+1)),COLORRED;
B:REF(L,BARSLAST(CURRBARSCOUNT=CONST(ZD)+1)),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=CONST(ZG)+1,H,'死叉5天前最高'),COLORYELLOW,DRAWABOVE;
DRAWTEXT(CURRBARSCOUNT=CONST(ZD)+1,L,' 金叉5天前最低'),COLORYELLOW,DRAWABOVE;
DRAWTEXT(CURRBARSCOUNT=CONST(死叉)+1,MA5,'死叉'),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=CONST(金叉)+1,MA5,'金叉'),COLORRED;
DRAWICON(CONST(ZG)>CONST(ZD) AND COUNT(C>A,ZG)=1 AND C>A AND C/B<1.2,H,1);
老K股票学习网解答:
MA5:=MA(C,5);
MA10:=MA(C,10);
死叉:=BARSLAST(CROSS(MA10,MA5));
金叉:=BARSLAST(CROSS(MA5,MA10));
ZG:=FINDHIGHBARS(H,死叉+1,5,1);
ZD:=FINDLOWBARS(L,金叉+1,5,1);
A:CURRBARSCOUNT=CONST(ZD)+1;
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!