在黄色字“金叉5天前最低”出现时写一个选股或预警指标
在黄色字“金叉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);
公式网www.gpxiazai.com解答:
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;
- 上一篇公式:把指标公式改成选股公式.买入结构9
- 下一篇公式:通达信黄金启动点,抓主升浪顶级主图公式